Skip to content

Commit 5ae895b

Browse files
Update parameters
1 parent 73500a6 commit 5ae895b

File tree

3 files changed

+43
-8
lines changed

3 files changed

+43
-8
lines changed

azure-pipelines.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,27 @@ schedules:
2626
- main
2727
always: true
2828

29+
pool:
30+
vmImage: windows-latest
31+
2932
variables:
3033
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
34+
DOTNET_CLI_TELEMETRY_OPTOUT: true
35+
Solution: asp.sln
3136
BuildConfiguration: Release
3237
VersionSuffix: ''
3338
SkipSigning: false
3439

35-
pool:
36-
vmImage: windows-latest
37-
3840
steps:
3941
- template: build/steps-ci.yml
42+
parameters:
43+
solution: ${{ variables.Solution }}
44+
configuration: ${{ variables.BuildConfiguration }}
45+
4046
- ${{ if eq(variables['Build.Reason'], 'Manual') }}:
41-
- template: build/steps-release.yml
47+
- template: build/steps-release.yml
48+
parameters:
49+
solution: ${{ variables.Solution }}
50+
configuration: ${{ variables.BuildConfiguration }}
51+
versionSuffix: ${{ variables.VersionSuffix }}
52+
skipSigning: ${{ variables.SkipSigning }}

build/steps-ci.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
parameters:
2+
- name: solution
3+
type: string
4+
default: ''
5+
- name: configuration
6+
type: string
7+
default: Release
8+
19
steps:
210
- task: UseDotNet@2
311
displayName: Install .NET SDK
@@ -9,6 +17,7 @@ steps:
917
displayName: Build and Test
1018
inputs:
1119
command: test
12-
configuration: $(BuildConfiguration)
20+
projects: ${{ parameters.solution }}
21+
configuration: ${{ parameters.configuration }}
1322
testRunTitle: Unit Tests
1423
publishTestResults: true

build/steps-release.yml

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,25 @@
1+
parameters:
2+
- name: solution
3+
type: string
4+
default: ''
5+
- name: configuration
6+
type: string
7+
default: Release
8+
- name: versionSuffix
9+
type: string
10+
default: ''
11+
- name: skipSigning
12+
type: boolean
13+
default: false
14+
115
steps:
216
- task: DotNetCoreCLI@2
317
displayName: Pack Packages
418
inputs:
519
command: pack
6-
configuration: $(BuildConfiguration)
7-
buildProperties: 'VersionSuffix="$(VersionSuffix)"'
20+
projects: ${{ parameters.solution }}
21+
configuration: ${{ parameters.configuration }}
22+
buildProperties: VersionSuffix=${{ parameters.versionSuffix }}
823
outputDir: $(Build.ArtifactStagingDirectory)/packages
924
noBuild: true
1025

@@ -30,7 +45,7 @@ steps:
3045
--description "Adds versioning semantics to APIs build with ASP.NET"
3146
--descriptionUrl "https://github.com/dotnet/aspnet-api-versioning"
3247
displayName: Sign Artifacts
33-
condition: ${{ not(variables.SkipSigning) }}
48+
condition: ${{ not(parameters.skipSigning) }}
3449

3550
- task: DotNetCoreCLI@2
3651
displayName: Extract Signed Artifacts

0 commit comments

Comments
 (0)