1+ variables :
2+ # used for SDL and arcade
3+ - name : _TeamName
4+ value : AspNetCore
5+ - name : _DotNetPublishToBlobFeed
6+ value : true
7+ - name : DOTNET_SKIP_FIRST_TIME_EXPERIENCE
8+ value : true
9+ - name : _PublishUsingPipelines
10+ value : true
11+ - name : _DotNetArtifactsCategory
12+ value : SIGNALR_CPP
13+ - name : _DotNetValidationArtifactsCategory
14+ value : SIGNALR_CPP
15+ - name : Build.Repository.Clean
16+ value : true
17+ - name : _BuildConfig
18+ value : ' Debug'
19+ # used for post-build phases, internal builds only
20+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
21+ - group : DotNet-AspNet-SDLValidation-Params
22+
123trigger :
224- master
325
4- jobs :
5- - template : .azure/default-build.yml
6- parameters :
7- agentOs : Windows
8- cMakeRunArgs : ' -A x64'
9- beforeBuild :
10- - powershell : " & vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg"
11- condition : ne(variables.CACHE_RESTORED, 'true')
12- displayName : vcpkg install dependencies
26+ stages :
27+ - stage : build
28+ displayName : Build
29+ jobs :
30+ - template : .azure/default-build.yml
31+ parameters :
32+ agentOs : Windows
33+ jobName : Windows_Build_Test
34+ cMakeRunArgs : ' -A x64'
35+ beforeBuild :
36+ # check if vcpkg exists on the machine before trying to build it
37+ - powershell : |
38+ if ((Get-Command vcpkg.exe -ErrorAction SilentlyContinue) -eq $null) {
39+ & ./submodules/vcpkg/bootstrap-vcpkg.bat
40+ }
41+ condition: ne(variables.CACHE_RESTORED, 'true')
42+ displayName: Bootstrap vcpkg
43+ - powershell : |
44+ if (Get-Command vcpkg.exe -ErrorAction SilentlyContinue) {
45+ & vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg
46+ } else {
47+ & ./submodules/vcpkg/vcpkg.exe install cpprestsdk:x64-windows --vcpkg-root ./submodules/vcpkg
48+ }
49+ condition: ne(variables.CACHE_RESTORED, 'true')
50+ displayName: vcpkg install dependencies
51+ afterBuild :
52+ # Create empty build manifest for Build Asset Registry
53+ - powershell : " eng/common/sdk-task.ps1 -restore -task GenerateBuildManifest /p:PackagesToPublishPattern=$(Build.ArtifactStagingDirectory)/*.nupkg /p:AssetManifestFilePath=$(Build.SourcesDirectory)/artifacts/log/$(_BuildConfig)/AssetManifest/manifest.xml /p:ManifestBuildData=\" Location=https://dotnetfeed.blob.core.windows.net/aspnet-aspnetcore/index.json\" "
54+ displayName : Generate Build Manifest
55+ condition : eq(and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')), 'true')
56+
57+ - template : .azure/default-build.yml
58+ parameters :
59+ agentOs : macOs
60+ jobName : Mac_Build_Test
61+ beforeBuild :
62+ # XCode 11 doesn't play nicely with gcc, workaround by using XCode 10. We can try updating to a newer XCode in the future
63+ # Once the problem has been resolved
64+ - script : sudo xcode-select --switch /Applications/Xcode_10.3.app
65+ - script : brew install gcc
66+ - bash : " ./submodules/vcpkg/bootstrap-vcpkg.sh"
67+ condition : ne(variables.CACHE_RESTORED, 'true')
68+ displayName : Bootstrap vcpkg
69+ - bash : " ./submodules/vcpkg/vcpkg install cpprestsdk"
70+ condition : ne(variables.CACHE_RESTORED, 'true')
71+ displayName : vcpkg install dependencies
72+
73+ - template : .azure/default-build.yml
74+ parameters :
75+ agentOs : Linux
76+ jobName : Linux_Build_Test
77+ beforeBuild :
78+ - script : sudo vcpkg install cpprestsdk boost-system boost-chrono boost-thread --vcpkg-root ./submodules/vcpkg
79+ condition : ne(variables.CACHE_RESTORED, 'true')
80+ displayName : vcpkg install dependencies
1381
14- - template : .azure/default-build.yml
15- parameters :
16- agentOs : macOs
17- beforeBuild :
18- # XCode 11 doesn't play nicely with gcc workaround by using XCode 10. We can try updating to a newer XCode in the future
19- # Once the problem has been resolved
20- - script : sudo xcode-select --switch /Applications/Xcode_10.3.app
21- - script : brew install gcc
22- - bash : " ./submodules/vcpkg/bootstrap-vcpkg.sh "
23- displayName : Bootstrap vcpkg
24- - bash : " ./submodules/vcpkg/vcpkg install cpprestsdk "
25- condition : ne(variables.CACHE_RESTORED, ' true')
26- displayName : vcpkg install dependencies
82+ # Publish to the BAR
83+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
84+ - template : /eng/common/templates/job/publish-build-assets.yml
85+ parameters :
86+ dependsOn :
87+ - Windows_Build_Test
88+ - Mac_Build_Test
89+ - Linux_Build_Test
90+ pool :
91+ vmImage : vs2017-win2016
92+ publishUsingPipelines : ${{ variables._PublishUsingPipelines }}
93+ enablePublishBuildArtifacts : true # publish artifacts/log files
94+ continueOnError : true
2795
28- - template : .azure/default-build.yml
29- parameters :
30- agentOs : Linux
31- beforeBuild :
32- - script : sudo vcpkg install cpprestsdk boost-system boost-chrono boost-thread --vcpkg-root ./submodules/vcpkg
33- condition : ne(variables.CACHE_RESTORED, 'true')
34- displayName : vcpkg install dependencies
96+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }} :
97+ - template : /eng/common/templates/post-build/post-build.yml
98+ parameters :
99+ enableSigningValidation : false
100+ enableNugetValidation : false
101+ publishInstallersAndChecksums : false
102+ # This is to enable SDL runs as part of Post-Build Validation Stage
103+ SDLValidationParameters :
104+ enable : true
105+ continueOnError : false
106+ params : ' -SourceToolsList @("policheck","credscan")
107+ -TsaInstanceURL $(_TsaInstanceURL)
108+ -TsaProjectName $(_TsaProjectName)
109+ -TsaNotificationEmail $(_TsaNotificationEmail)
110+ -TsaCodebaseAdmin $(_TsaCodebaseAdmin)
111+ -TsaBugAreaPath $(_TsaBugAreaPath)
112+ -TsaIterationPath $(_TsaIterationPath)
113+ -TsaRepositoryName "AspNetCore"
114+ -TsaCodebaseName "AspNetCore"
115+ -TsaPublish $True
116+ -PoliCheckAdditionalRunConfigParams @("UserExclusionPath < $(Build.SourcesDirectory)/eng/PoliCheckExclusions.xml")'
0 commit comments