From 92709d5542ed83418ed72ae9833739241d875a23 Mon Sep 17 00:00:00 2001 From: Jordan Petridis Date: Wed, 11 Sep 2019 17:39:14 +0300 Subject: [PATCH] ci_template: Add an auto-retry policy Its common that docker will throw transient errors, especially on the windows runner. If such the case, automatically retry the job. --- gitlab/ci_template.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gitlab/ci_template.yml b/gitlab/ci_template.yml index af0ed80..19b0079 100644 --- a/gitlab/ci_template.yml +++ b/gitlab/ci_template.yml @@ -35,8 +35,17 @@ variables: --variants werror --timestamps +.global_retry_policy: + retry: + max: 2 + when: + - 'runner_system_failure' + - 'api_failure' + manifest: image: $MANIFEST_IMAGE + extends: + - '.global_retry_policy' stage: 'preparation' script: - cd /gst-ci @@ -50,6 +59,8 @@ manifest: gst indent: image: $INDENT_IMAGE + extends: + - '.global_retry_policy' stage: 'preparation' variables: GIT_STRATEGY: 'fetch' @@ -77,6 +88,8 @@ gst indent: .build: stage: 'build' + extends: + - '.global_retry_policy' needs: - "manifest" dependencies: @@ -170,6 +183,8 @@ build clang fedora x86_64: .test: stage: 'test' + extends: + - '.global_retry_policy' variables: # Disable colored output to avoid weird rendering issues GST_DEBUG_NO_COLOR: "true" @@ -312,6 +327,8 @@ valgrind ges: .cerbero: stage: "build" image: $CERBERO_IMAGE + extends: + - '.global_retry_policy' needs: - "manifest" dependencies: @@ -375,6 +392,8 @@ valgrind ges: .build windows: image: $WINDOWS_IMAGE + extends: + - '.global_retry_policy' stage: 'build' needs: - 'manifest' @@ -633,6 +652,8 @@ build cerbero cross win64: # .cross-android universal examples: image: $ANDROID_IMAGE + extends: + - '.global_retry_policy' stage: 'integrate' variables: EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples @@ -811,6 +832,8 @@ build cerbero cross-ios universal: documentation: image: $FEDORA_IMAGE + extends: + - '.global_retry_policy' needs: - "build fedora x86_64" - "manifest" @@ -841,6 +864,8 @@ documentation: # .cross-ios universal examples: stage: 'integrate' + extends: + - '.global_retry_policy' variables: EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples # disable codesigning so we don't need developer identities on the CI -- 2.7.4