Skip to content
This repository was archived by the owner on Dec 27, 2020. It is now read-only.

Commit a1910b9

Browse files
committed
Fix: [AzurePipelines] fail 'script' if any of the commands fail
It turns out the 'script' tasks only fail if the last command fails. Setting '-e' means it fails as soon as any of the commands fail, which is much more what we mean.
1 parent d2fc25c commit a1910b9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

azure-pipelines-linux.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ jobs:
5959
# Explicitly we do not publish them via Docker Hub as that would mean the CI
6060
# updates production images, which is a bad idea.
6161
- script: |
62+
set -ex
6263
mkdir base-images
6364
docker save openttd/base:$(Agent.JobName) | gzip -c > base-$(Agent.JobName).tar.gz
6465
displayName: 'Save base image'
@@ -100,6 +101,7 @@ jobs:
100101
base-images/base-linux-debian-stretch-amd64.tar.gz
101102
downloadPath: '$(System.ArtifactsDirectory)'
102103
- script: |
104+
set -ex
103105
for i in $(System.ArtifactsDirectory)/base-images/*.tar.gz; do gunzip -c $i | docker load; done
104106
displayName: 'Load base images'
105107
@@ -174,6 +176,7 @@ jobs:
174176
itemPattern: 'base-images/base-linux-$(Distro)-$(Release)-$(Arch).tar.gz'
175177
downloadPath: '$(System.ArtifactsDirectory)'
176178
- script: |
179+
set -ex
177180
for i in $(System.ArtifactsDirectory)/base-images/*.tar.gz; do gunzip -c $i | docker load; done
178181
displayName: 'Load base images'
179182
@@ -223,6 +226,7 @@ jobs:
223226
base-images/base-linux-debian-stretch-amd64.tar.gz
224227
downloadPath: '$(System.ArtifactsDirectory)'
225228
- script: |
229+
set -ex
226230
for i in $(System.ArtifactsDirectory)/base-images/*.tar.gz; do gunzip -c $i | docker load; done
227231
displayName: 'Load base images'
228232

0 commit comments

Comments
 (0)