Make docker containers only be built when necessary

This commit is contained in:
Nadja Reitzenstein 2022-05-05 19:28:40 +02:00
parent 08d7512d01
commit 4265393c30

View File

@ -146,6 +146,7 @@ release_job:
build:docker-releases: build:docker-releases:
stage: dockerify stage: dockerify
needs: ["stable:build"]
image: image:
name: gcr.io/kaniko-project/executor:v1.6.0-debug name: gcr.io/kaniko-project/executor:v1.6.0-debug
entrypoint: [""] entrypoint: [""]
@ -157,9 +158,11 @@ build:docker-releases:
- /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG - /kaniko/executor --force --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
rules: rules:
- if: $CI_COMMIT_TAG =~ "release/.*" - if: $CI_COMMIT_TAG =~ "release/.*"
when: never
build:docker-development: build:docker-development:
stage: dockerify stage: dockerify
needs: ["stable:build"]
image: image:
name: gcr.io/kaniko-project/executor:v1.6.0-debug name: gcr.io/kaniko-project/executor:v1.6.0-debug
entrypoint: [""] entrypoint: [""]