@@ -8,20 +8,24 @@ variables:
88 buildPlatform : ' Any CPU'
99 buildConfiguration : ' Release'
1010
11+ # Install NuGet Installer tool
1112steps :
1213- task : NuGetToolInstaller@0
1314
15+ # Restore NuGet packages for the Visual Studio Solution
1416- task : NuGetCommand@2
1517 inputs :
1618 restoreSolution : ' $(solution)'
1719
20+ # Build Visual Studio Solution
1821- task : VSBuild@1
1922 inputs :
2023 solution : ' $(solution)'
2124 msbuildArgs : ' /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
2225 platform : ' $(buildPlatform)'
2326 configuration : ' $(buildConfiguration)'
2427
28+ # Run Integration tests only when merging from develop to Master. This is achieved by setting a 'condition' to the task
2529- task : VSTest@2
2630 condition : and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
2731 inputs :
@@ -51,30 +55,35 @@ steps:
5155 -MailTrapTestEmailUsername $(mailTrapTestEmailUsername)
5256 -MailTrapTestEmailPassword $(mailTrapTestEmailPassword)
5357
58+ # Copy the required Project DLL's to Artifact Staging Directory
5459- task : CopyFiles@2
5560 inputs :
5661 SourceFolder : ' $(system.defaultworkingdirectory)'
5762 Contents : ' **\bin\**'
5863 TargetFolder : ' $(build.artifactstagingdirectory)'
5964
65+ # Copy NuGet spec file to Artifact Staging Directory
6066- task : CopyFiles@2
6167 inputs :
6268 SourceFolder : ' $(system.defaultworkingdirectory)'
6369 Contents : ' *.nuspec*'
6470 TargetFolder : ' $(build.artifactstagingdirectory)'
6571
72+ # Copy NuGet targets file to Artifact Staging Directory
6673- task : CopyFiles@2
6774 inputs :
6875 SourceFolder : ' $(system.defaultworkingdirectory)'
6976 Contents : ' *.targets*'
7077 TargetFolder : ' $(build.artifactstagingdirectory)'
7178
79+ # Copy the variables.json file which contains the version numbers for the NuGet package to Artifact Staging Directory
7280- task : CopyFiles@2
7381 inputs :
7482 SourceFolder : ' $(system.defaultworkingdirectory)'
7583 Contents : ' variables.json'
7684 TargetFolder : ' $(build.artifactstagingdirectory)'
7785
86+ # Publish Artifact Staging Directory to a Container to be accessed in Release pipeline for publishing NuGet package
7887- task : PublishBuildArtifacts@1
7988 inputs :
8089 PathtoPublish : ' $(build.artifactStagingDirectory)'
0 commit comments