Skip to content

Commit 0c6d24e

Browse files
committed
Print job doc URL on job failure
1 parent 6117644 commit 0c6d24e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/ci.yml

+14-2
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,20 @@ jobs:
191191
CARGO_INCREMENTAL=0 CARGO_TARGET_DIR=../../../build/citool cargo build
192192
193193
- name: run the build
194-
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
195-
run: src/ci/scripts/run-build-from-ci.sh 2>&1
194+
run: |
195+
set +e
196+
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
197+
src/ci/scripts/run-build-from-ci.sh 2>&1
198+
STATUS=$?
199+
set -e
200+
201+
if [[ "$STATUS" -ne 0 && -n "$CI_JOB_DOC_URL" ]]; then
202+
echo "****************************************************************************"
203+
echo "To find more information about this job, visit the following URL:"
204+
echo "$CI_JOB_DOC_URL"
205+
echo "****************************************************************************"
206+
fi
207+
exit ${STATUS}
196208
env:
197209
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
198210
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}

0 commit comments

Comments
 (0)