|
| 1 | +trigger: |
| 2 | + batch: true |
| 3 | + branches: |
| 4 | + include: |
| 5 | + - main |
| 6 | + - release/7.0.3xx |
| 7 | + - internal/release/* |
| 8 | + |
| 9 | +pr: |
| 10 | + branches: |
| 11 | + include: |
| 12 | + - main |
| 13 | + - release/* |
| 14 | + - internal/release/* |
| 15 | + |
| 16 | + |
| 17 | +variables: |
| 18 | + - name: teamName |
| 19 | + value: Roslyn-Project-System |
| 20 | + - name: _DotNetPublishToBlobFeed |
| 21 | + value: false |
| 22 | + - name: _CIBuild |
| 23 | + value: -restore -build -sign -pack -ci |
| 24 | + - name: _DotNetArtifactsCategory |
| 25 | + value: .NETCore |
| 26 | + - name: _DotNetValidationArtifactsCategory |
| 27 | + value: .NETCore |
| 28 | + - name: PostBuildSign |
| 29 | + value: true |
| 30 | + - ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 31 | + - name: _InternalRuntimeDownloadArgs |
| 32 | + value: '' |
| 33 | + - ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 34 | + - name: _DotNetPublishToBlobFeed |
| 35 | + value: true |
| 36 | + - name: Codeql.Enabled |
| 37 | + value: true |
| 38 | + - group: DotNetBuilds storage account read tokens |
| 39 | + - name: _InternalRuntimeDownloadArgs |
| 40 | + value: /p:DotNetRuntimeSourceFeed=https://dotnetbuilds.blob.core.windows.net/internal |
| 41 | + /p:DotNetRuntimeSourceFeedKey=$(dotnetbuilds-internal-container-read-token-base64) |
| 42 | + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 43 | + - group: DotNet-CLI-SDLValidation-Params |
| 44 | + |
| 45 | +stages: |
| 46 | +- stage: build |
| 47 | + displayName: Build |
| 48 | + jobs: |
| 49 | + - job: Publish_Build_Configuration |
| 50 | + pool: |
| 51 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 52 | + name: NetCore-Svc-Public |
| 53 | + demands: ImageOverride -equals windows.vs2019.amd64.open |
| 54 | + ${{ if eq(variables['System.TeamProject'], 'internal') }}: |
| 55 | + name: NetCore1ESPool-Svc-Internal |
| 56 | + demands: ImageOverride -equals windows.vs2019.amd64 |
| 57 | + steps: |
| 58 | + - publish: $(Build.SourcesDirectory)\eng\BuildConfiguration |
| 59 | + artifact: BuildConfiguration |
| 60 | + displayName: Publish Build Config |
| 61 | + - template: /eng/build.yml |
| 62 | + parameters: |
| 63 | + agentOs: Windows_NT |
| 64 | + pool: |
| 65 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 66 | + name: NetCore-Svc-Public |
| 67 | + demands: ImageOverride -equals windows.vs2022preview.amd64.open |
| 68 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 69 | + name: NetCore1ESPool-Svc-Internal |
| 70 | + demands: ImageOverride -equals windows.vs2022preview.amd64 |
| 71 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 72 | + helixTargetQueue: Windows.Amd64.VS2022.Pre.Open |
| 73 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 74 | + helixTargetQueue: Windows.Amd64.VS2022.Pre |
| 75 | + strategy: |
| 76 | + matrix: |
| 77 | + Build_Release: |
| 78 | + _BuildConfig: Release |
| 79 | + _PublishArgs: '-publish /p:DotNetPublishUsingPipelines=true' |
| 80 | + ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: |
| 81 | + _SignType: test |
| 82 | + _Test: -test |
| 83 | + ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 84 | + _SignType: real |
| 85 | + _Test: '' |
| 86 | + - template: /eng/common/templates/job/source-build.yml |
| 87 | + parameters: |
| 88 | + platform: |
| 89 | + name: 'Managed' |
| 90 | + container: 'mcr.microsoft.com/dotnet-buildtools/prereqs:centos-7-3e800f1-20190501005343' |
| 91 | + - ${{ if or(eq(variables['System.TeamProject'], 'public'), in(variables['Build.Reason'], 'PullRequest')) }}: |
| 92 | + - template: /eng/build.yml |
| 93 | + parameters: |
| 94 | + agentOs: Windows_NT_FullFramework |
| 95 | + pool: |
| 96 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 97 | + name: NetCore-Svc-Public |
| 98 | + demands: ImageOverride -equals windows.vs2022preview.amd64.open |
| 99 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 100 | + name: NetCore1ESPool-Svc-Internal |
| 101 | + demands: ImageOverride -equals windows.vs2022preview.amd64 |
| 102 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 103 | + helixTargetQueue: Windows.Amd64.VS2022.Pre.Open |
| 104 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 105 | + helixTargetQueue: Windows.Amd64.VS2022.Pre |
| 106 | + strategy: |
| 107 | + matrix: |
| 108 | + Build_Debug: |
| 109 | + _BuildConfig: Debug |
| 110 | + _PublishArgs: '' |
| 111 | + _SignType: test |
| 112 | + _Test: -test |
| 113 | + |
| 114 | + - template: /eng/build.yml |
| 115 | + parameters: |
| 116 | + agentOs: Windows_NT_TestAsTools |
| 117 | + pool: |
| 118 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 119 | + name: NetCore-Svc-Public |
| 120 | + demands: ImageOverride -equals windows.vs2019.amd64.open |
| 121 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 122 | + name: NetCore1ESPool-Svc-Internal |
| 123 | + demands: ImageOverride -equals windows.vs2019.amd64 |
| 124 | + strategy: |
| 125 | + matrix: |
| 126 | + Build_Debug: |
| 127 | + _BuildConfig: Debug |
| 128 | + _PublishArgs: '' |
| 129 | + _SignType: test |
| 130 | + |
| 131 | + - template: /eng/build.yml |
| 132 | + parameters: |
| 133 | + agentOs: Ubuntu_20_04 |
| 134 | + pool: |
| 135 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 136 | + name: NetCore-Svc-Public |
| 137 | + demands: ImageOverride -equals Build.Ubuntu.2004.Amd64.Open |
| 138 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 139 | + name: NetCore1ESPool-Svc-Internal |
| 140 | + demands: ImageOverride -equals Build.Ubuntu.2004.Amd64 |
| 141 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 142 | + helixTargetQueue: Ubuntu.1804.Amd64.Open |
| 143 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 144 | + helixTargetQueue: Ubuntu.1804.Amd64 |
| 145 | + strategy: |
| 146 | + matrix: |
| 147 | + Build_Release: |
| 148 | + _BuildConfig: Release |
| 149 | + _PublishArgs: '' |
| 150 | + _SignType: test |
| 151 | + |
| 152 | + - template: /eng/build.yml |
| 153 | + parameters: |
| 154 | + agentOs: Darwin |
| 155 | + pool: |
| 156 | + vmImage: 'macOS-latest' |
| 157 | + ${{ if eq(variables['System.TeamProject'], 'public') }}: |
| 158 | + helixTargetQueue: OSX.1200.Amd64.Open |
| 159 | + ${{ if ne(variables['System.TeamProject'], 'public') }}: |
| 160 | + helixTargetQueue: OSX.1200.Amd64 |
| 161 | + strategy: |
| 162 | + matrix: |
| 163 | + Build_Release: |
| 164 | + _BuildConfig: Release |
| 165 | + _PublishArgs: '' |
| 166 | + _SignType: test |
| 167 | + |
| 168 | + - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 169 | + - template: /eng/common/templates/job/publish-build-assets.yml |
| 170 | + parameters: |
| 171 | + publishUsingPipelines: true |
| 172 | + dependsOn: |
| 173 | + - Windows_NT |
| 174 | + - Source_Build_Managed |
| 175 | + pool: |
| 176 | + name: NetCore1ESPool-Svc-Internal |
| 177 | + demands: ImageOverride -equals windows.vs2019.amd64 |
| 178 | +- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: |
| 179 | + - template: /eng/common/templates/post-build/post-build.yml |
| 180 | + parameters: |
| 181 | + publishingInfraVersion: 3 |
| 182 | + enableSymbolValidation: false |
| 183 | + enableSigningValidation: false |
| 184 | + enableNugetValidation: false |
| 185 | + enableSourceLinkValidation: false |
| 186 | + publishInstallersAndChecksums: true |
| 187 | + SDLValidationParameters: |
| 188 | + enable: false |
| 189 | + params: ' -SourceToolsList @("policheck","credscan") |
| 190 | + -TsaInstanceURL $(_TsaInstanceURL) |
| 191 | + -TsaProjectName $(_TsaProjectName) |
| 192 | + -TsaNotificationEmail $(_TsaNotificationEmail) |
| 193 | + -TsaCodebaseAdmin $(_TsaCodebaseAdmin) |
| 194 | + -TsaBugAreaPath $(_TsaBugAreaPath) |
| 195 | + -TsaIterationPath $(_TsaIterationPath) |
| 196 | + -TsaRepositoryName "dotnet-sdk" |
| 197 | + -TsaCodebaseName "dotnet-sdk" |
| 198 | + -TsaPublish $True' |
0 commit comments