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.
This commit is contained in:
Jordan Petridis 2019-09-11 17:39:14 +03:00
parent bcb1ae6cf2
commit 92709d5542
No known key found for this signature in database
GPG key ID: 902CC06D159744F5

View file

@ -35,8 +35,17 @@ variables:
--variants werror --variants werror
--timestamps --timestamps
.global_retry_policy:
retry:
max: 2
when:
- 'runner_system_failure'
- 'api_failure'
manifest: manifest:
image: $MANIFEST_IMAGE image: $MANIFEST_IMAGE
extends:
- '.global_retry_policy'
stage: 'preparation' stage: 'preparation'
script: script:
- cd /gst-ci - cd /gst-ci
@ -50,6 +59,8 @@ manifest:
gst indent: gst indent:
image: $INDENT_IMAGE image: $INDENT_IMAGE
extends:
- '.global_retry_policy'
stage: 'preparation' stage: 'preparation'
variables: variables:
GIT_STRATEGY: 'fetch' GIT_STRATEGY: 'fetch'
@ -77,6 +88,8 @@ gst indent:
.build: .build:
stage: 'build' stage: 'build'
extends:
- '.global_retry_policy'
needs: needs:
- "manifest" - "manifest"
dependencies: dependencies:
@ -170,6 +183,8 @@ build clang fedora x86_64:
.test: .test:
stage: 'test' stage: 'test'
extends:
- '.global_retry_policy'
variables: variables:
# Disable colored output to avoid weird rendering issues # Disable colored output to avoid weird rendering issues
GST_DEBUG_NO_COLOR: "true" GST_DEBUG_NO_COLOR: "true"
@ -312,6 +327,8 @@ valgrind ges:
.cerbero: .cerbero:
stage: "build" stage: "build"
image: $CERBERO_IMAGE image: $CERBERO_IMAGE
extends:
- '.global_retry_policy'
needs: needs:
- "manifest" - "manifest"
dependencies: dependencies:
@ -375,6 +392,8 @@ valgrind ges:
.build windows: .build windows:
image: $WINDOWS_IMAGE image: $WINDOWS_IMAGE
extends:
- '.global_retry_policy'
stage: 'build' stage: 'build'
needs: needs:
- 'manifest' - 'manifest'
@ -633,6 +652,8 @@ build cerbero cross win64:
# #
.cross-android universal examples: .cross-android universal examples:
image: $ANDROID_IMAGE image: $ANDROID_IMAGE
extends:
- '.global_retry_policy'
stage: 'integrate' stage: 'integrate'
variables: variables:
EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
@ -811,6 +832,8 @@ build cerbero cross-ios universal:
documentation: documentation:
image: $FEDORA_IMAGE image: $FEDORA_IMAGE
extends:
- '.global_retry_policy'
needs: needs:
- "build fedora x86_64" - "build fedora x86_64"
- "manifest" - "manifest"
@ -841,6 +864,8 @@ documentation:
# #
.cross-ios universal examples: .cross-ios universal examples:
stage: 'integrate' stage: 'integrate'
extends:
- '.global_retry_policy'
variables: variables:
EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples EXAMPLES_HOME: ${CI_PROJECT_DIR}/examples
# disable codesigning so we don't need developer identities on the CI # disable codesigning so we don't need developer identities on the CI