|
| 1 | +trigger: none |
| 2 | + |
| 3 | +pr: none |
| 4 | + |
| 5 | +variables: |
| 6 | + - name: _TeamName |
| 7 | + value: dotnet-r9 |
| 8 | + - name: NativeToolsOnMachine |
| 9 | + value: true |
| 10 | + - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE |
| 11 | + value: true |
| 12 | + |
| 13 | + - name: SkipQualityGates |
| 14 | + value: false |
| 15 | + |
| 16 | + - name: runAsPublic |
| 17 | + value: ${{ eq(variables['System.TeamProject'], 'public') }} |
| 18 | + |
| 19 | + - name: _BuildConfig |
| 20 | + value: Release |
| 21 | + - name: isOfficialBuild |
| 22 | + value: ${{ and(ne(variables['runAsPublic'], 'true'), notin(variables['Build.Reason'], 'PullRequest')) }} |
| 23 | + - name: Build.Arcade.ArtifactsPath |
| 24 | + value: $(Build.SourcesDirectory)/artifacts/ |
| 25 | + - name: Build.Arcade.LogsPath |
| 26 | + value: $(Build.Arcade.ArtifactsPath)log/$(_BuildConfig)/ |
| 27 | + - name: Build.Arcade.TestResultsPath |
| 28 | + value: $(Build.Arcade.ArtifactsPath)TestResults/$(_BuildConfig)/ |
| 29 | + - name: Build.Arcade.VSIXOutputPath |
| 30 | + value: $(Build.Arcade.ArtifactsPath)VSIX |
| 31 | + |
| 32 | + - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/validation/'), eq(variables['Build.Reason'], 'Manual')) }}: |
| 33 | + - name: PostBuildSign |
| 34 | + value: false |
| 35 | + - ${{ else }}: |
| 36 | + - name: PostBuildSign |
| 37 | + value: true |
| 38 | + |
| 39 | + - name: _PublishArgs |
| 40 | + value: >- |
| 41 | + /p:DotNetPublishUsingPipelines=true |
| 42 | + - name: _OfficialBuildIdArgs |
| 43 | + value: /p:OfficialBuildId=$(BUILD.BUILDNUMBER) |
| 44 | + # needed for signing |
| 45 | + - name: _SignType |
| 46 | + value: test |
| 47 | + - name: _SignArgs |
| 48 | + value: /p:DotNetSignType=$(_SignType) /p:TeamName=$(_TeamName) /p:Sign=$(_Sign) /p:DotNetPublishUsingPipelines=true |
| 49 | + - name: _Sign |
| 50 | + value: true |
| 51 | + |
| 52 | + - name: enableSourceIndex |
| 53 | + value: false |
| 54 | + |
| 55 | +resources: |
| 56 | + repositories: |
| 57 | + - repository: 1ESPipelineTemplates |
| 58 | + type: git |
| 59 | + name: 1ESPipelineTemplates/1ESPipelineTemplates |
| 60 | + ref: refs/tags/release |
| 61 | + |
| 62 | +extends: |
| 63 | + template: v1/1ES.Unofficial.PipelineTemplate.yml@1ESPipelineTemplates |
| 64 | + parameters: |
| 65 | + sdl: |
| 66 | + sourceAnalysisPool: |
| 67 | + name: NetCore1ESPool-Internal |
| 68 | + image: windows.vs2022preview.amd64 |
| 69 | + os: windows |
| 70 | + customBuildTags: |
| 71 | + - ES365AIMigrationTooling |
| 72 | + |
| 73 | + stages: |
| 74 | + - stage: build |
| 75 | + displayName: Build |
| 76 | + variables: |
| 77 | + - template: /eng/common/templates-official/variables/pool-providers.yml@self |
| 78 | + jobs: |
| 79 | + - template: /eng/common/templates-official/jobs/jobs.yml@self |
| 80 | + parameters: |
| 81 | + enableMicrobuild: true |
| 82 | + enableTelemetry: true |
| 83 | + enableSourceIndex: ${{ variables['enableSourceIndex'] }} |
| 84 | + runAsPublic: ${{ variables['runAsPublic'] }} |
| 85 | + # Publish build logs |
| 86 | + enablePublishBuildArtifacts: false |
| 87 | + # Publish test logs |
| 88 | + enablePublishTestResults: true |
| 89 | + # Publish NuGet packages using v3 |
| 90 | + # https://github.com/dotnet/arcade/blob/main/Documentation/CorePackages/Publishing.md#basic-onboarding-scenario-for-new-repositories-to-the-current-publishing-version-v3 |
| 91 | + enablePublishUsingPipelines: false |
| 92 | + enablePublishBuildAssets: false |
| 93 | + workspace: |
| 94 | + clean: all |
| 95 | + |
| 96 | + jobs: |
| 97 | + |
| 98 | + # ---------------------------------------------------------------- |
| 99 | + # This job build and run tests on Windows |
| 100 | + # ---------------------------------------------------------------- |
| 101 | + - job: Windows |
| 102 | + timeoutInMinutes: 180 |
| 103 | + testResultsFormat: VSTest |
| 104 | + pool: |
| 105 | + name: NetCore1ESPool-Internal |
| 106 | + image: windows.vs2022preview.amd64 |
| 107 | + os: windows |
| 108 | + |
| 109 | + variables: |
| 110 | + - _buildScript: $(Build.SourcesDirectory)/build.cmd -ci -NativeToolsOnMachine |
| 111 | + |
| 112 | + templateContext: |
| 113 | + outputs: |
| 114 | + - output: pipelineArtifact |
| 115 | + displayName: 'Publish Azure DevOps extension artifacts' |
| 116 | + condition: succeeded() |
| 117 | + targetPath: '$(Build.Arcade.VSIXOutputPath)' |
| 118 | + artifactName: 'VSIXArtifacts' |
| 119 | + |
| 120 | + preSteps: |
| 121 | + - checkout: self |
| 122 | + clean: true |
| 123 | + persistCredentials: true |
| 124 | + fetchDepth: 1 |
| 125 | + |
| 126 | + steps: |
| 127 | + - template: /eng/pipelines/templates/BuildAndTest.yml |
| 128 | + parameters: |
| 129 | + buildScript: $(_buildScript) |
| 130 | + buildConfig: $(_BuildConfig) |
| 131 | + repoLogPath: $(Build.Arcade.LogsPath) |
| 132 | + repoTestResultsPath: $(Build.Arcade.TestResultsPath) |
| 133 | + skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} |
| 134 | + isWindows: true |
| 135 | + warnAsError: 0 |
| 136 | + |
| 137 | + # ---------------------------------------------------------------- |
| 138 | + # This job build and run tests on Ubuntu |
| 139 | + # ---------------------------------------------------------------- |
| 140 | + - job: Ubuntu |
| 141 | + timeoutInMinutes: 180 |
| 142 | + testResultsFormat: VSTest |
| 143 | + pool: |
| 144 | + name: NetCore1ESPool-Internal |
| 145 | + image: 1es-mariner-2 |
| 146 | + os: linux |
| 147 | + |
| 148 | + variables: |
| 149 | + - _buildScript: $(Build.SourcesDirectory)/build.sh --ci |
| 150 | + |
| 151 | + preSteps: |
| 152 | + - checkout: self |
| 153 | + clean: true |
| 154 | + persistCredentials: true |
| 155 | + fetchDepth: 1 |
| 156 | + |
| 157 | + steps: |
| 158 | + - template: /eng/pipelines/templates/BuildAndTest.yml |
| 159 | + parameters: |
| 160 | + buildScript: $(_buildScript) |
| 161 | + buildConfig: $(_BuildConfig) |
| 162 | + repoLogPath: $(Build.Arcade.LogsPath) |
| 163 | + repoTestResultsPath: $(Build.Arcade.TestResultsPath) |
| 164 | + skipQualityGates: ${{ eq(variables['SkipQualityGates'], 'true') }} |
| 165 | + isWindows: false |
| 166 | + warnAsError: 0 |
| 167 | + |
| 168 | + # ---------------------------------------------------------------- |
| 169 | + # This stage performs quality gates enforcements |
| 170 | + # ---------------------------------------------------------------- |
| 171 | + - stage: codecoverage |
| 172 | + displayName: CodeCoverage |
| 173 | + dependsOn: |
| 174 | + - build |
| 175 | + condition: and(succeeded('build'), ne(variables['SkipQualityGates'], 'true')) |
| 176 | + variables: |
| 177 | + - template: /eng/common/templates-official/variables/pool-providers.yml@self |
| 178 | + jobs: |
| 179 | + - template: /eng/common/templates-official/jobs/jobs.yml@self |
| 180 | + parameters: |
| 181 | + enableMicrobuild: true |
| 182 | + enableTelemetry: true |
| 183 | + runAsPublic: ${{ variables['runAsPublic'] }} |
| 184 | + workspace: |
| 185 | + clean: all |
| 186 | + |
| 187 | + # ---------------------------------------------------------------- |
| 188 | + # This stage downloads the code coverage reports from the build jobs, |
| 189 | + # merges those and validates the combined test coverage. |
| 190 | + # ---------------------------------------------------------------- |
| 191 | + jobs: |
| 192 | + - job: CodeCoverageReport |
| 193 | + timeoutInMinutes: 180 |
| 194 | + |
| 195 | + pool: |
| 196 | + name: NetCore1ESPool-Internal |
| 197 | + image: 1es-mariner-2 |
| 198 | + os: linux |
| 199 | + |
| 200 | + preSteps: |
| 201 | + - checkout: self |
| 202 | + clean: true |
| 203 | + persistCredentials: true |
| 204 | + fetchDepth: 1 |
| 205 | + |
| 206 | + steps: |
| 207 | + - script: $(Build.SourcesDirectory)/build.sh --ci --restore |
| 208 | + displayName: Init toolset |
| 209 | + |
| 210 | + - template: /eng/pipelines/templates/VerifyCoverageReport.yml |
| 211 | + |
| 212 | + |
| 213 | + # ---------------------------------------------------------------- |
| 214 | + # This stage only performs a build treating warnings as errors |
| 215 | + # to detect any kind of code style violations |
| 216 | + # ---------------------------------------------------------------- |
| 217 | + - stage: correctness |
| 218 | + displayName: Correctness |
| 219 | + dependsOn: [] |
| 220 | + variables: |
| 221 | + - template: /eng/common/templates-official/variables/pool-providers.yml@self |
| 222 | + jobs: |
| 223 | + - template: /eng/common/templates-official/jobs/jobs.yml@self |
| 224 | + parameters: |
| 225 | + enableMicrobuild: true |
| 226 | + enableTelemetry: true |
| 227 | + runAsPublic: ${{ variables['runAsPublic'] }} |
| 228 | + workspace: |
| 229 | + clean: all |
| 230 | + |
| 231 | + jobs: |
| 232 | + - job: WarningsCheck |
| 233 | + timeoutInMinutes: 180 |
| 234 | + |
| 235 | + pool: |
| 236 | + name: NetCore1ESPool-Internal |
| 237 | + image: 1es-mariner-2 |
| 238 | + os: linux |
| 239 | + |
| 240 | + variables: |
| 241 | + - _buildScript: $(Build.SourcesDirectory)/build.sh --ci |
| 242 | + |
| 243 | + preSteps: |
| 244 | + - checkout: self |
| 245 | + clean: true |
| 246 | + persistCredentials: true |
| 247 | + fetchDepth: 1 |
| 248 | + |
| 249 | + steps: |
| 250 | + - template: '\eng\pipelines\templates\BuildAndTest.yml' |
| 251 | + parameters: |
| 252 | + buildScript: $(_buildScript) |
| 253 | + buildConfig: $(_BuildConfig) |
| 254 | + repoLogPath: $(Build.Arcade.LogsPath) |
| 255 | + repoTestResultsPath: $(Build.Arcade.TestResultsPath) |
| 256 | + skipTests: true |
| 257 | + skipQualityGates: true |
| 258 | + isWindows: false |
0 commit comments