Skip to content

Commit 4190121

Browse files
committed
Pass sourceBuildId through variable templates
1 parent cb87353 commit 4190121

4 files changed

Lines changed: 33 additions & 1 deletion

File tree

eng/common/templates/variables/dotnet/build-test-publish.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
# Common variables for building/testing/publishing in the .NET team's pipelines
2+
parameters:
3+
# sourceBuildId should be overridden when skipping a build to run tests or
4+
# publish images that were produced in a different pipeline run.
5+
# Defaults to $(Build.BuildId) which refers to the current pipeline run.
6+
- name: sourceBuildId
7+
type: string
8+
default: ""
29

310
variables:
411
- template: /eng/common/templates/variables/dotnet/common.yml@self
12+
parameters:
13+
sourceBuildId: ${{ parameters.sourceBuildId }}
514

615
- name: commonVersionsImageInfoPath
716
value: build-info/docker

eng/common/templates/variables/dotnet/common.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1+
parameters:
2+
# sourceBuildId should be overridden when skipping a build to run tests or
3+
# publish images that were produced in a different pipeline run.
4+
# Defaults to $(Build.BuildId) which refers to the current pipeline run.
5+
- name: sourceBuildId
6+
type: string
7+
default: ""
8+
19
variables:
210
- template: /eng/common/templates/variables/common.yml@self
11+
parameters:
12+
sourceBuildId: ${{ parameters.sourceBuildId }}
13+
314
- name: publicProjectName
415
value: public
516
- name: internalProjectName

eng/pipelines/release-promotion.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ resources:
88

99
variables:
1010
- template: /eng/pipelines/variables/core.yml@self
11+
parameters:
12+
sourceBuildId: "$(resources.pipeline.dotnet-docker-release-staging.runID)"
1113
# Set pathArgs to empty in order to publish all images
1214
- name: imageBuilder.pathArgs
1315
value: ""

eng/pipelines/variables/core.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
1+
parameters:
2+
# sourceBuildId should be overridden when skipping a build to run tests or
3+
# publish images that were produced in a different pipeline run.
4+
# Defaults to $(Build.BuildId) which refers to the current pipeline run.
5+
- name: sourceBuildId
6+
type: string
7+
default: ""
8+
9+
110
variables:
211
- template: /eng/common/templates/variables/dotnet/build-test-publish.yml@self
3-
12+
parameters:
13+
sourceBuildId: ${{ parameters.sourceBuildId }}
414
- name: manifest
515
value: manifest.json
616
- name: publishEolAnnotations

0 commit comments

Comments
 (0)