Skip to content

Commit c01a236

Browse files
author
Sanju Yadav
committed
Task release pipeline add semvar changes
1 parent 5cc1005 commit c01a236

File tree

3 files changed

+37
-4
lines changed

3 files changed

+37
-4
lines changed

azure-pipelines.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ parameters:
4646
displayName: Publish to test feed (DistributedTasks-test), for infrastucture testing
4747
type: boolean
4848
default: false
49+
- name: useSemverBuildConfig
50+
displayName: Use Semver Build Config to support canary rollout
51+
type: boolean
52+
default: false
53+
- name: generateReleaseNotes
54+
displayName: Generate Release Notes for the deployed changes
55+
type: boolean
56+
default: true
4957

5058
variables:
5159
- name: currentDate
@@ -131,6 +139,8 @@ extends:
131139
- template: /ci/build-all-steps.yml@self
132140
parameters:
133141
os: Windows_NT
142+
useSemverBuildConfig: ${{ parameters.useSemverBuildConfig }}
143+
generateReleaseNotes: ${{ parameters.generateReleaseNotes }}
134144

135145
# Publish
136146
- job: publish
@@ -217,6 +227,7 @@ extends:
217227
- template: /ci/build-all-tasks.yml@self
218228
parameters:
219229
deploy_all_tasks: ${{ eq(parameters.task_deployment, 'Deploy all Tasks') }}
230+
useSemverBuildConfig: ${{ parameters.useSemverBuildConfig }}
220231

221232
# All tasks on Linux
222233
- job: build_all_linux

ci/build-all-steps.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
parameters:
22
os: ''
3+
useSemverBuildConfig: false
4+
generateReleaseNotes: true
35

46
steps:
57

@@ -68,6 +70,11 @@ steps:
6870
6971
- script: dotnet run --project BuildConfigGen/BuildConfigGen.csproj --no-launch-profile -- --all-tasks
7072
displayName: Verify generated files across tasks are up-to-date (Ensure BuildConfigGen outputs are consistent)
73+
condition: eq(${{ parameters.useSemverBuildConfig }}, false)
74+
75+
- script: dotnet run --project BuildConfigGen/BuildConfigGen.csproj --no-launch-profile -- --all-tasks --use-semver-build-config
76+
displayName: Verify generated files across tasks are up-to-date (Ensure BuildConfigGen outputs are consistent)
77+
condition: eq(${{ parameters.useSemverBuildConfig }}, true)
7178

7279
- powershell: ./ci/set-sprint-variables.ps1
7380
displayName: Set currentSprint variables
@@ -126,7 +133,11 @@ steps:
126133
# Build Tasks
127134
- script: node make.js serverBuild --task "$(getTaskPattern.task_pattern)" $(includeLocalPackagesBuildConfigParameter)
128135
displayName: Build Tasks
129-
condition: and(succeeded(), ne(variables['numTasks'], 0))
136+
condition: and(succeeded(), ne(variables['numTasks'], 0), eq('${{ parameters.useSemverBuildConfig }}', false))
137+
138+
- script: node make.js serverBuild --task "$(getTaskPattern.task_pattern)" $(includeLocalPackagesBuildConfigParameter) --useSemverBuildConfig true
139+
displayName: Build Tasks
140+
condition: and(succeeded(), ne(variables['numTasks'], 0), eq('${{ parameters.useSemverBuildConfig }}', true))
130141

131142
- script: node ./ci/after-build-check-tasks.js
132143
displayName: After build tasks validation
@@ -219,7 +230,8 @@ steps:
219230
succeeded(),
220231
in(variables['build.reason'], 'Schedule', 'Manual'),
221232
eq(variables['COURTESY_PUSH'], 'true'),
222-
eq(variables['Build.SourceBranch'], 'refs/heads/master')
233+
eq(variables['Build.SourceBranch'], 'refs/heads/master'),
234+
eq(${{ parameters.generateReleaseNotes }}, true)
223235
)
224236
continueOnError: true
225237
displayName: Create Release

ci/build-all-tasks.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
parameters:
44
- name: deploy_all_tasks
55
type: boolean
6+
- name: useSemverBuildConfig
7+
type: boolean
68

79
steps:
810
# Clean
@@ -36,12 +38,20 @@ steps:
3638
# Build tasks
3739
- script: node make.js serverBuild --task "$(task_pattern)" $(includeLocalPackagesBuildConfigParameter)
3840
displayName: Build tasks using pattern
39-
condition: and(succeeded(), eq('${{ parameters.deploy_all_tasks }}', false))
41+
condition: and(succeeded(), eq('${{ parameters.deploy_all_tasks }}', false), eq(${{ parameters.useSemverBuildConfig }}, false))
42+
43+
- script: node make.js serverBuild --task "$(task_pattern)" $(includeLocalPackagesBuildConfigParameter) --useSemverBuildConfig true;
44+
displayName: Build tasks using pattern
45+
condition: and(succeeded(), eq('${{ parameters.deploy_all_tasks }}', false), eq(${{ parameters.useSemverBuildConfig }}, true))
4046

4147
# Build all tasks
4248
- script: node make.js serverBuild $(includeLocalPackagesBuildConfigParameter)
4349
displayName: Build all tasks
44-
condition: and(succeeded(), eq('${{ parameters.deploy_all_tasks }}', true))
50+
condition: and(succeeded(), eq('${{ parameters.deploy_all_tasks }}', true), eq(${{ parameters.useSemverBuildConfig }}, false))
51+
52+
- script: node make.js serverBuild $(includeLocalPackagesBuildConfigParameter) --useSemverBuildConfig true;
53+
displayName: Build all tasks
54+
condition: and(succeeded(), eq('${{ parameters.deploy_all_tasks }}', true), eq(${{ parameters.useSemverBuildConfig }}, true))
4555

4656
# Stage tasks individually into the package directory
4757
- script: node ./ci/stage-package.js true individually

0 commit comments

Comments
 (0)