Skip to content

Commit fc84378

Browse files
committed
.azure-pipelines/release.yml: add pre-build stage
Add a stage to the Azure Pipelines release pipeline that can perform pre-build validation, and capture information used in all subsequent stages and jobs. In this case, the VERSION file contents. Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
1 parent acb4233 commit fc84378

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

.azure-pipelines/release.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,22 @@ extends:
2525
image: win-x86_64-ado1es
2626
os: windows
2727
stages:
28-
- stage: windows
29-
displayName: 'Windows'
28+
- stage: prebuild
29+
displayName: 'Pre-build Validation'
3030
jobs:
31-
- job: win_x86_build
32-
displayName: 'Windows Build and Sign (x86)'
31+
- job: vars
32+
displayName: 'Read variables'
3333
pool:
3434
name: GitClient-1ESHostedPool-intel-pc
35-
image: win-x86_64-ado1es
36-
os: windows
35+
image: ubuntu-x86_64-ado1es
36+
os: linux
3737
steps:
3838
- checkout: self
39+
- task: Bash@3
40+
displayName: 'Read version file'
41+
name: version
42+
inputs:
43+
targetType: inline
44+
script: |
45+
# Set the version variable for later stages to consume
46+
echo "##vso[task.setvariable variable=value;isOutput=true;isReadOnly=true]$(cat ./VERSION | sed -E 's/.[0-9]+$//')"

0 commit comments

Comments
 (0)