All things Tech with a dash of Geek for good measure!

So it is time to upgrade your nopcommerce install to the latest and greatest… Like me, you have given up on Travis, want to customise the source and use Azure-Pipeline as your dev-ops pipeline…

Given that you are Competent with Git and have https://github.com/marketplace/azure-pipelines enabled in your repo, it is quite simple… just create the following `azure-pipelines.yml` file in the root folder of your repo, and (subject to adding the extension to GitHub), away you go!

pool:
  name: Azure Pipelines
steps:
- task: DotNetCoreCLI@2
  displayName: 'dotnet restore'
  inputs:
    command: restore
    projects: ./src/NopCommerce.sln
- task: DotNetCoreCLI@2
  displayName: 'dotnet build'
  inputs:
    projects: ./src/NopCommerce.sln
    arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
  displayName: 'dotnet test'
  inputs:
    command: test
    projects: |
     ./src/Tests/Nop.Core.Tests/Nop.Core.Tests.csproj
     ./src/Tests/Nop.Web.MVC.Tests/Nop.Web.MVC.Tests.csproj
     ./src/Tests/Nop.Services.Tests/Nop.Services.Tests.csproj
    arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI@2
  displayName: 'dotnet publish'
  inputs:
    command: publish
    arguments: '--configuration $(BuildConfiguration) --output $(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact'
  inputs:
    ArtifactName: '$(Parameters.ArtifactName)'

In the next part, we shall see if we can get Code Coverage working (although you might be disappointed by the results!)

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Tag Cloud

%d bloggers like this: