NopCommerce Azure Devops

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 years ago
Hello,

Anybody tried nopcommerce in Azure Devops integration .!


Thanks & Regards
Vignesh Arvind
4 years ago
I've just started playing with Azure Devops and nopCommerce. So far I've got a pipeline which builds the source from the master branch on my repo and runs the tests.

Here's the azure-pipelines.yml for the build pipeline:


trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'  

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\Nop.*.Tests.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
    publishRunAttachments: false
    


Hope that gets you going.  Next I want to figure out how to use a pipeline to create a resource group with an app and a database in my Azure account, and then deploy the app to it.

Would be interested to hear if anyone else has done this already.
3 years ago
techtoniqmatt wrote:
I've just started playing with Azure Devops and nopCommerce. So far I've got a pipeline which builds the source from the master branch on my repo and runs the tests.

Here's the azure-pipelines.yml for the build pipeline:


trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'  

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    testSelector: 'testAssemblies'
    testAssemblyVer2: |
      **\Nop.*.Tests.dll
      !**\*TestAdapter.dll
      !**\obj\**
    searchFolder: '$(System.DefaultWorkingDirectory)'
    publishRunAttachments: false
    


Hope that gets you going.  Next I want to figure out how to use a pipeline to create a resource group with an app and a database in my Azure account, and then deploy the app to it.

Would be interested to hear if anyone else has done this already.


Did u end up finishing the pipeline?
3 years ago
Figured out what worked on 4.1 and 4.2.
This pipeline is for master branch, and if you're not using npm or webpack you can remove those lines. Italic font.


resources:
- repo: self

trigger:
  branches:
    include:
    - master

pool:
  name: Hosted
  demands: npm

steps:
- task: UseDotNet@2
  displayName: 'Use .NET Core sdk'
  inputs:
    packageType: sdk
    version: 2.2.203
- task: Npm@1
  displayName: 'npm install'
  inputs:
    workingDir: src/Presentation/Nop.Web
- task: Npm@1
  displayName: 'npm webpack'
  inputs:
    command: custom
    workingDir: src/Presentation/Nop.Web
    customCommand: 'run start'

- task: DotNetCoreCLI@2
  displayName: 'dotnet restore'
  inputs:
    command: restore
    projects: src/*.sln
    
- task: DotNetCoreCLI@2
  displayName: 'dotnet build'
  inputs:
    projects: src/*.sln
    arguments: '--configuration release'

- task: DotNetCoreCLI@2
  displayName: Publish
  inputs:
    command: publish
    publishWebProjects: True
    arguments: '--configuration release --output $(build.artifactstagingdirectory)'

- task: PublishBuildArtifacts@1
  displayName: 'Publish Artifact'
  inputs:
    artifactName: 'drop-yaml'
    PathtoPublish: '$(build.artifactstagingdirectory)'
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.