From 76ffc72742c32d5e3f3e5bca9c562339e7bd737b Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 3 Dec 2021 07:07:47 +0000 Subject: [PATCH] CI: Don't stream wget directly into bash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If our environment has pipefail set, bash could exit early before wget has completed, and we will die with a broken pipe. Work around this by first downloading from wget, and then executing from bash. Signed-off-by: Daniel Stone Acked-by: Michel Dänzer Part-of: --- .gitlab-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index de51c2b6e13..6534fb118e9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,9 @@ variables: MESA_TEMPLATES_COMMIT: &ci-templates-commit 290b79e0e78eab67a83766f4e9691be554fc4afd CI_PRE_CLONE_SCRIPT: |- set -o xtrace - /usr/bin/wget -q -O- ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh | bash - + wget -q -O download-git-cache.sh ${CI_PROJECT_URL}/-/raw/${CI_COMMIT_SHA}/.gitlab-ci/download-git-cache.sh + bash download-git-cache.sh + rm download-git-cache.sh set +o xtrace MINIO_HOST: minio-packet.freedesktop.org # per-pipeline artifact storage on MinIO