ci/b2c: skip install.tar extraction if the tarball is not present
authorEric Engestrom <eric@igalia.com>
Thu, 31 Aug 2023 12:32:06 +0000 (13:32 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 31 Aug 2023 17:18:22 +0000 (17:18 +0000)
This is the case when retrying after a B2C_TIMEOUT for instance.

Fixes: 85a8f03211090bc9a23a ("ci: delete install.tar after extracting it to avoid re-uploading it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24970>

.gitlab-ci/test/gitlab-ci.yml

index 84000b2..2a8f691 100644 (file)
@@ -337,7 +337,7 @@ clang-format:
       [ -d "$CI_COMMON_SCRIPTS" ] || exit 1
 
 
-      B2C_TEST_SCRIPT="bash -c 'tar xf ${INSTALL_TARBALL_NAME} && rm ${INSTALL_TARBALL_NAME}; ./install/common/init-stage2.sh'"
+      B2C_TEST_SCRIPT="bash -c 'if [ -f ${INSTALL_TARBALL_NAME} ]; then tar xf ${INSTALL_TARBALL_NAME} && rm ${INSTALL_TARBALL_NAME}; fi; ./install/common/init-stage2.sh'"
 
       # The Valve CI gateway receives jobs in a YAML format. Create a
       # job description from the CI environment.