Skip to content
This repository has been archived by the owner on Jun 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #166 from relativitydev/azure-pipelines-added-comm…
Browse files Browse the repository at this point in the history
…ents-to-yml-file

Update build-pipeline.yml for Azure Pipelines
  • Loading branch information
calimetikcura committed Apr 3, 2020
2 parents 08c055b + 62b5c1a commit 294173e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,24 @@ variables:
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

# Install NuGet Installer tool
steps:
- task: NuGetToolInstaller@0

# Restore NuGet packages for the Visual Studio Solution
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'

# Build Visual Studio Solution
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

# Run Integration tests only when merging from develop to Master. This is achieved by setting a 'condition' to the task
- task: VSTest@2
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
inputs:
Expand Down Expand Up @@ -51,30 +55,35 @@ steps:
-MailTrapTestEmailUsername $(mailTrapTestEmailUsername)
-MailTrapTestEmailPassword $(mailTrapTestEmailPassword)

# Copy the required Project DLL's to Artifact Staging Directory
- task: CopyFiles@2
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '**\bin\**'
TargetFolder: '$(build.artifactstagingdirectory)'

# Copy NuGet spec file to Artifact Staging Directory
- task: CopyFiles@2
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '*.nuspec*'
TargetFolder: '$(build.artifactstagingdirectory)'

# Copy NuGet targets file to Artifact Staging Directory
- task: CopyFiles@2
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: '*.targets*'
TargetFolder: '$(build.artifactstagingdirectory)'

# Copy the variables.json file which contains the version numbers for the NuGet package to Artifact Staging Directory
- task: CopyFiles@2
inputs:
SourceFolder: '$(system.defaultworkingdirectory)'
Contents: 'variables.json'
TargetFolder: '$(build.artifactstagingdirectory)'

# Publish Artifact Staging Directory to a Container to be accessed in Release pipeline for publishing NuGet package
- task: PublishBuildArtifacts@1
inputs:
PathtoPublish: '$(build.artifactStagingDirectory)'
Expand Down

0 comments on commit 294173e

Please sign in to comment.