summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Petridis <jpetridis@gnome.org>2020-11-20 00:40:34 +0200
committerJordan Petridis <jpetridis@gnome.org>2020-11-20 00:41:59 +0200
commit68de539cbced316e74a154125358015719b2cbd9 (patch)
tree7679be8bfba4fa0f5ef3dcfe8b3b1bc7a9ee34e7
parent980ef9b1c4aedda26d4fdfa676a958844966540a (diff)
downloadmutter-alatiera/workflow-rules.tar.gz
ci: Set some sensible defaultsalatiera/workflow-rules
* Allow for all jobs to be cancelled if a newer commit is pushed * Automatically retry jobs if they fail due to some infrastructure issue
-rw-r--r--.gitlab-ci.yml12
1 files changed, 12 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 796030112..dbe028348 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -30,6 +30,18 @@ stages:
dnf clean all
+default:
+ # Cancel jobs if newer commits are pushed to the branch
+ interruptible: true
+ # Auto-retry jobs in case of infra failures
+ retry:
+ max: 1
+ when:
+ - 'runner_system_failure'
+ - 'stuck_or_timeout_failure'
+ - 'scheduler_failure'
+ - 'api_failure'
+
workflow:
rules:
- if: '$CI_MERGE_REQUEST_IID'