From f7dd0878b9ce0560712f15b1676a48cfec1433b3 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Tue, 5 Mar 2024 10:46:31 +0100 Subject: [PATCH] gitlab: new pipeline 'fail' New pipeline called fail that runs in the 'finish' stage but only when a job fails. The job updates the github status to indicate failure. --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 889f456f..4922a425 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -122,3 +122,13 @@ finish: - shell script: - schutzbot/update_github_status.sh finish + +fail: + stage: finish + tags: + - shell + script: + - schutzbot/update_github_status.sh fail + - exit 1 # make the pipeline fail so it doesn't look like success in gitlab + when: + on_failure