summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorJakub Beránek <berykubik@gmail.com>2025-03-13 14:50:37 +0100
committerJakub Beránek <berykubik@gmail.com>2025-03-13 14:56:57 +0100
commit0c6d24e373aafc84b9a8b4a00724d7f71b340419 (patch)
treecb2d0ecf6ca64c198ded5291a936ce561944a8bc /.github
parent611764417bd35f631a6384ec0acd88fbc37cdb9d (diff)
downloadrust-0c6d24e373aafc84b9a8b4a00724d7f71b340419.tar.gz
rust-0c6d24e373aafc84b9a8b4a00724d7f71b340419.zip
Print job doc URL on job failure
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml16
1 files changed, 14 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 98fac742450..96c0955e871 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -191,8 +191,20 @@ jobs:
           CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
 
       - name: run the build
-        # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
-        run: src/ci/scripts/run-build-from-ci.sh 2>&1
+        run: |
+          set +e
+          # Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
+          src/ci/scripts/run-build-from-ci.sh 2>&1
+          STATUS=$?
+          set -e
+
+          if [[ "$STATUS" -ne 0 && -n "$CI_JOB_DOC_URL" ]]; then
+            echo "****************************************************************************"
+            echo "To find more information about this job, visit the following URL:"
+            echo "$CI_JOB_DOC_URL"
+            echo "****************************************************************************"
+          fi
+          exit ${STATUS}
         env:
           AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
           AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}