feat(interruptible): Make jobs that can be cancelled safely interruptible

https://docs.gitlab.com/ee/ci/yaml/index.html#interruptible
This commit is contained in:
Timo Beller 2022-09-20 17:53:01 +02:00
parent b4b8079a6d
commit ea61a8f8f7
22 changed files with 23 additions and 0 deletions

View File

@ -1,6 +1,7 @@
.ansible_lint:
image: quay.io/ansible/toolset:3.5.0
stage: lint
interruptible: true
variables:
EXTRA_ARGS: ""
script:
@ -11,6 +12,7 @@
extends: .ansible_playbook_run
rules:
- when: always
interruptible: true
script:
- ansible --version
- ansible-playbook -i $INVENTORY_PATH $PLAYBOOK_PATH $EXTRA_ARGS --check

View File

@ -59,6 +59,7 @@
.docker-compose-validate:
image: docker:20.10.16-alpine3.15
stage: verify
interruptible: true
variables:
DOCKER_COMPOSE_VERSION: "v2.7.0"
DOCKER_COMPOSE: "$CI_PROJECT_DIR/docker-compose"

View File

@ -1,5 +1,6 @@
.container-build-common:
stage: build
interruptible: true
variables:
CONTEXT_LOCATION: $CI_PROJECT_DIR
DOCKER_REGISTRY: $CI_REGISTRY_IMAGE

View File

@ -3,6 +3,7 @@
name: docker.io/aquasec/trivy:0.31.3
entrypoint: [ "" ]
stage: verify
interruptible: true
variables:
IMAGE_PATH: $CI_PROJECT_DIR/image.tar
EXITCODE: 1

View File

@ -15,6 +15,7 @@
.documentation-check-confluence-validity:
extends: .documentation-tool-common
stage: verify
interruptible: true
needs: []
variables:
OUTPUT_DIR: merge_requests

View File

@ -1,5 +1,6 @@
.gradle-build:
stage: build
interruptible: true
image: $GRADLE_IMAGE
before_script:
- >

View File

@ -1,6 +1,7 @@
.gradle-licence-bom:
image: $GRADLE_IMAGE
stage: build
interruptible: true
script:
- >
if [ "$BACKEND_DIR" != "" ]; then

View File

@ -1,6 +1,7 @@
.gradle-verify:
image: $GRADLE_IMAGE
stage: verify
interruptible: true
script:
- >
if [ "$BACKEND_DIR" != "" ]; then

View File

@ -1,5 +1,6 @@
.database-diff-common:
stage: verify
interruptible: true
artifacts:
when: on_failure
expire_in: 2 weeks

View File

@ -1,5 +1,6 @@
.maven-build:
stage: build
interruptible: true
image: $MAVEN_IMAGE
before_script:
- >

View File

@ -1,5 +1,6 @@
.maven-dependencies:
stage: dependencies
interruptible: true
image: $MAVEN_IMAGE
script:
- >

View File

@ -1,6 +1,7 @@
.maven-licence-bom:
image: $MAVEN_IMAGE
stage: build
interruptible: true
script:
- >
if [ "$BACKEND_DIR" != "" ]; then

View File

@ -1,6 +1,7 @@
.maven-verify:
image: $MAVEN_IMAGE
stage: verify
interruptible: true
script:
- >
if [ "$BACKEND_DIR" != "" ]; then

View File

@ -1,6 +1,7 @@
.license-asciidoc:
image: gitlab.exxcellent.de:4567/gilden/ci/exxcellent-license-tools
stage: verify
interruptible: true
variables:
BOM_FILE: bom.json
ALLOWED_LICENSES: valid-licenses.txt

View File

@ -1,6 +1,7 @@
.npm-build:
image: $NODE_IMAGE
stage: build
interruptible: true
variables:
FRONTEND_BUILD_DIR: '**/dist'
script:

View File

@ -1,6 +1,7 @@
.npm-dependencies:
image: $NODE_IMAGE
stage: dependencies
interruptible: true
script:
- >
if [ "$FRONTEND_DIR" != "" ]; then

View File

@ -1,6 +1,7 @@
.npm-e2e:
image: $NODE_E2E_IMAGE
stage: verify
interruptible: true
script:
- >
if [ "$FRONTEND_DIR" != "" ]; then

View File

@ -1,6 +1,7 @@
.npm-lint:
image: $NODE_IMAGE
stage: verify
interruptible: true
script:
- >
if [ "$FRONTEND_DIR" != "" ]; then

View File

@ -1,6 +1,7 @@
.npm-verify:
image: $NODE_IMAGE
stage: verify
interruptible: true
script:
- >
if [ "$FRONTEND_DIR" != "" ]; then

View File

@ -3,6 +3,7 @@
name: docker.io/aquasec/trivy:0.31.3
entrypoint: [ "" ]
stage: verify
interruptible: true
needs: []
variables:
SCAN_PATH: $CI_PROJECT_DIR

View File

@ -1,5 +1,6 @@
.sonar-template-common:
stage: verify
interruptible: true
variables:
SONAR_HOST_URL: http://sonar7.exxcellent.de/sonar7
SONAR_PROJECT_KEY: ""

View File

@ -1,5 +1,6 @@
.sonar-template-common:
stage: verify
interruptible: true
variables:
SONAR_HOST_URL: https://sonar.exxcellent.de/sonar8
SONAR_PROJECT_NAME: $CI_PROJECT_NAME