Skip to content

Commit a104e5e

Browse files
authored
[Backport 17.8] Use pipeline parameters (#81302)
Backport of #75096, #80336 & #81271
1 parent 199485e commit a104e5e

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

azure-pipelines-official.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,15 @@ schedules:
4141
- cron: "0 8 23-29 * 0"
4242
displayName: "Monthly smoke test"
4343
branches:
44-
include:
44+
include:
4545
- main
4646
- release/*
47-
exclude:
47+
exclude:
4848
- ""
4949
always: true # Run even if there have been no source code changes since the last successful scheduled run
5050
batch: false # Do not run the pipeline if the previously scheduled run is in-progress
5151

52-
# The variables `_DotNetArtifactsCategory` and `_DotNetValidationArtifactsCategory` are required for proper publishing of build artifacts. See https://github.com/dotnet/roslyn/pull/38259
5352
variables:
54-
- name: _DotNetArtifactsCategory
55-
value: .NETCore
56-
- name: _DotNetValidationArtifactsCategory
57-
value: .NETCoreValidation
5853
- group: DotNet-Roslyn-SDLValidation-Params
5954
- name: Codeql.Enabled
6055
value: true
@@ -271,10 +266,13 @@ extends:
271266

272267
- task: MicroBuildSigningPlugin@4
273268
inputs:
274-
signType: $(SignType)
269+
signType: ${{ parameters.SignType }}
275270
zipSources: false
276271
feedSource: https://dnceng.pkgs.visualstudio.com/_packaging/MicroBuildToolset/nuget/v3/index.json
277-
condition: and(succeeded(), in(variables['SignType'], 'test', 'real'))
272+
# Set ConnectedPMEServiceName if the build is a CI build, otherwise it is not needed
273+
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
274+
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
275+
condition: and(succeeded(), in('${{ parameters.SignType }}', 'test', 'real'))
278276

279277
- task: PowerShell@2
280278
displayName: Build
@@ -290,16 +288,14 @@ extends:
290288
-binaryLog
291289
-configuration $(BuildConfiguration)
292290
-officialBuildId $(Build.BuildNumber)
293-
-officialSkipTests $(SkipTests)
294-
-officialSkipApplyOptimizationData $(SkipApplyOptimizationData)
291+
-officialSkipTests ${{ parameters.SkipTests }}
292+
-officialSkipApplyOptimizationData ${{ parameters.SkipApplyOptimizationData }}
295293
-officialSourceBranchName $(SourceBranchName)
296-
-officialIbcDrop $(IbcDrop)
294+
-officialIbcDrop ${{ parameters.IbcDrop }}
297295
-officialVisualStudioDropAccessToken $(_DevDivDropAccessToken)
298296
/p:RepositoryName=$(Build.Repository.Name)
299297
/p:VisualStudioDropName=$(VisualStudio.DropName)
300-
/p:DotNetSignType=$(SignType)
301-
/p:PublishToSymbolServer=true
302-
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
298+
/p:DotNetSignType=${{ parameters.SignType }}
303299
/p:DotnetPublishUsingPipelines=true
304300
/p:IgnoreIbcMergeErrors=true
305301
/p:GenerateSbom=true
@@ -334,7 +330,7 @@ extends:
334330
testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(BuildConfiguration)\*.xml'
335331
mergeTestResults: true
336332
testRunTitle: 'Unit Tests'
337-
condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true'))
333+
condition: and(succeededOrFailed(), ${{ not(parameters.SkipTests) }})
338334

339335
# Publish to Build Asset Registry
340336
- template: /eng/common/templates-official/job/publish-build-assets.yml@self

0 commit comments

Comments
 (0)