Mesa (main): CI: Don't stream wget directly into bash

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 3 17:05:53 UTC 2021


Module: Mesa
Branch: main
Commit: 76ffc72742c32d5e3f3e5bca9c562339e7bd737b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=76ffc72742c32d5e3f3e5bca9c562339e7bd737b

Author: Daniel Stone <daniels at collabora.com>
Date:   Fri Dec  3 07:07:47 2021 +0000

CI: Don't stream wget directly into bash

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 <daniels at collabora.com>
Acked-by: Michel Dänzer <mdaenzer at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14036>

---

 .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



More information about the mesa-commit mailing list