summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2019-11-27 15:38:36 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2019-11-28 05:00:26 +0000
commita3a1f4f3d956d94cdf9f22e2e09a41abe907f089 (patch)
tree7b252f71c921f709448d81a48f4909926190b336 /.gitlab-ci.yml
parent25105d04347f0ebc001fd0dc6638d70ad178b1c7 (diff)
gitlab CI: add a global policy snippet for retries and interruptible
We want to retry if we have a system/timeout/stuck failure. And our jobs are all interruptible, we want to cancel them when the branch has new commits. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml25
1 files changed, 24 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 463e5e85..3b2a74c3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -103,6 +103,15 @@ variables:
UDEV_NOT_AVAILABLE: 1
GIT_DEPTH: 1
+.policy:
+ retry:
+ max: 2
+ when:
+ - runner_system_failure
+ - stuck_or_timeout_failure
+ # cancel run when a newer version is pushed to the branch
+ interruptible: true
+
.default_artifacts: &default_artifacts
artifacts:
name: "meson-logs-$CI_JOB_NAME"
@@ -151,6 +160,7 @@ variables:
fedora:30@qemu-prep:
extends:
- .fedora@qemu-build
+ - .policy
stage: container_prep
tags:
- kvm
@@ -168,6 +178,7 @@ fedora:30@qemu-prep:
fedora:30@container-prep:
extends:
- .fedora@container-build
+ - .policy
stage: container_prep
variables:
GIT_STRATEGY: none
@@ -180,6 +191,7 @@ fedora:30@container-prep:
fedora:31@container-prep:
extends:
- .fedora@container-build
+ - .policy
stage: container_prep
variables:
GIT_STRATEGY: none
@@ -193,6 +205,7 @@ fedora:31@container-prep:
ubuntu:19.10@container-prep:
extends:
- .ubuntu@container-build
+ - .policy
stage: container_prep
variables:
GIT_STRATEGY: none
@@ -205,6 +218,7 @@ ubuntu:19.10@container-prep:
ubuntu:19.04@container-prep:
extends:
- .ubuntu@container-build
+ - .policy
stage: container_prep
variables:
GIT_STRATEGY: none
@@ -218,6 +232,7 @@ ubuntu:19.04@container-prep:
arch:rolling@container-prep:
extends:
- .arch@container-build
+ - .policy
stage: container_prep
variables:
GIT_STRATEGY: none
@@ -230,6 +245,7 @@ arch:rolling@container-prep:
alpine:latest@container-prep:
extends:
- .alpine@container-build
+ - .policy
stage: container_prep
variables:
GIT_STRATEGY: none
@@ -240,6 +256,8 @@ alpine:latest@container-prep:
<<: *pull_upstream_or_rebuild
.freebsd@container-prep:
+ extends:
+ - .policy
stage: container_prep
image: $BUILDAH_IMAGE
<<: *pull_upstream_or_rebuild
@@ -284,6 +302,8 @@ freebsd:11.2@container-prep:
# $container_image:$tag
#
.container-clean:
+ extends:
+ - .policy
stage: container_clean
image: $BUILDAH_IMAGE
script:
@@ -411,6 +431,8 @@ freebsd:11.2@container-clean:
#################################################################
.build@template:
+ extends:
+ - .policy
stage: build
<<: *default_artifacts
<<: *default_build
@@ -433,6 +455,8 @@ freebsd:11.2@container-clean:
# - SUITE_NAMES: all elements will be expanded to libinput-test-suite-$value
# Set one or the other, not both.
.fedora:30@test-suite-vm:
+ extends:
+ - .policy
stage: VM
image: $QEMU_CONTAINER_IMAGE
tags:
@@ -488,7 +512,6 @@ freebsd:11.2@container-clean:
allow_failure: true
needs: ['fedora:30@qemu-prep']
-
# in reverse order of duration to get the slowest ones started first
fedora:30@vm-touchpad:
extends: