Skip to content

Commit 8c677ec

Browse files
authored
[Backport 17.10] Use pipeline parameters (#81301)
Backport of #75096, #80336 & #81271
1 parent c13e168 commit 8c677ec

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

azure-pipelines-official.yml

Lines changed: 9 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,13 +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
277272
# Set ConnectedPMEServiceName if the build is a CI build, otherwise it is not needed
278273
${{ if eq(variables['Build.Reason'], 'IndividualCI') }}:
279274
ConnectedPMEServiceName: 248d384a-b39b-46e3-8ad5-c2c210d5e7ca
280-
condition: and(succeeded(), in(variables['SignType'], 'test', 'real'))
275+
condition: and(succeeded(), in('${{ parameters.SignType }}', 'test', 'real'))
281276

282277
- task: PowerShell@2
283278
displayName: Build
@@ -293,16 +288,14 @@ extends:
293288
-binaryLog
294289
-configuration $(BuildConfiguration)
295290
-officialBuildId $(Build.BuildNumber)
296-
-officialSkipTests $(SkipTests)
297-
-officialSkipApplyOptimizationData $(SkipApplyOptimizationData)
291+
-officialSkipTests ${{ parameters.SkipTests }}
292+
-officialSkipApplyOptimizationData ${{ parameters.SkipApplyOptimizationData }}
298293
-officialSourceBranchName $(SourceBranchName)
299-
-officialIbcDrop $(IbcDrop)
294+
-officialIbcDrop ${{ parameters.IbcDrop }}
300295
-officialVisualStudioDropAccessToken $(_DevDivDropAccessToken)
301296
/p:RepositoryName=$(Build.Repository.Name)
302297
/p:VisualStudioDropName=$(VisualStudio.DropName)
303-
/p:DotNetSignType=$(SignType)
304-
/p:PublishToSymbolServer=true
305-
/p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
298+
/p:DotNetSignType=${{ parameters.SignType }}
306299
/p:DotnetPublishUsingPipelines=true
307300
/p:IgnoreIbcMergeErrors=true
308301
/p:GenerateSbom=true
@@ -337,7 +330,7 @@ extends:
337330
testResultsFiles: '$(Build.SourcesDirectory)\artifacts\TestResults\$(BuildConfiguration)\*.xml'
338331
mergeTestResults: true
339332
testRunTitle: 'Unit Tests'
340-
condition: and(succeededOrFailed(), ne(variables['SkipTests'], 'true'))
333+
condition: and(succeededOrFailed(), ${{ not(parameters.SkipTests) }})
341334

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

0 commit comments

Comments
 (0)