Skip to content

Commit eae4e24

Browse files
committed
Engineering - ensure that the pipeline fails if the pwsh tasks fail
1 parent 506cce1 commit eae4e24

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

build/pre-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ extends:
8080
displayName: Create build cache archive
8181
8282
- pwsh: |
83+
$ErrorActionPreference = "Stop"
84+
8385
# Get the OAuth token from the git config
8486
$result = git config --get-regexp .*extraheader ^AUTHORIZATION:
8587
$basicToken = $result -split "AUTHORIZATION: basic " | Select-Object -Last 1
@@ -98,6 +100,7 @@ extends:
98100
displayName: mixin
99101
100102
- pwsh: |
103+
$ErrorActionPreference = "Stop"
101104
$result = git config --get-regexp .*extraheader ^AUTHORIZATION:
102105
$basicToken = $result -split "AUTHORIZATION: basic " | Select-Object -Last 1
103106
$oauthToken = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($basicToken)) -split ":" | Select-Object -Last 1
@@ -177,6 +180,7 @@ extends:
177180
displayName: Install dotnet cli
178181

179182
- pwsh: |
183+
$ErrorActionPreference = "Stop"
180184
$result = git config --get-regexp .*extraheader ^AUTHORIZATION:
181185
$basicToken = $result -split "AUTHORIZATION: basic " | Select-Object -Last 1
182186
$oauthToken = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($basicToken)) -split ":" | Select-Object -Last 1

build/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ extends:
8282
displayName: Create build cache archive
8383
8484
- pwsh: |
85+
$ErrorActionPreference = "Stop"
86+
8587
# Get the OAuth token from the git config
8688
$result = git config --get-regexp .*extraheader ^AUTHORIZATION:
8789
$basicToken = $result -split "AUTHORIZATION: basic " | Select-Object -Last 1
@@ -100,6 +102,7 @@ extends:
100102
displayName: mixin
101103
102104
- pwsh: |
105+
$ErrorActionPreference = "Stop"
103106
$result = git config --get-regexp .*extraheader ^AUTHORIZATION:
104107
$basicToken = $result -split "AUTHORIZATION: basic " | Select-Object -Last 1
105108
$oauthToken = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($basicToken)) -split ":" | Select-Object -Last 1
@@ -179,6 +182,7 @@ extends:
179182
displayName: Install dotnet cli
180183

181184
- pwsh: |
185+
$ErrorActionPreference = "Stop"
182186
$result = git config --get-regexp .*extraheader ^AUTHORIZATION:
183187
$basicToken = $result -split "AUTHORIZATION: basic " | Select-Object -Last 1
184188
$oauthToken = [System.Text.Encoding]::ASCII.GetString([System.Convert]::FromBase64String($basicToken)) -split ":" | Select-Object -Last 1

0 commit comments

Comments
 (0)