Skip to content
Commits on Source (2)
......@@ -8,13 +8,32 @@ include:
- local: templates/standard.yml
- local: kaniko.yml
#########################################
# Builds an image for running Renovate
container_image_build:
#########################################
.container_builds:
stage: release
variables:
KANIKO_BUILD_FILE: Dockerfile.renovate
KANIKO_EXTRA_ARGS: |
--build-arg GL_COMMON_CI_TASKS_DEFAULT_ASDF_GOLANG_VERSION
KANIKO_DESTINATION: $CI_REGISTRY_IMAGE/renovate:${CI_COMMIT_REF_SLUG}
extends:
- .kaniko_base
container_image_build:
variables:
KANIKO_DESTINATION: $CI_REGISTRY_IMAGE/renovate:${CI_COMMIT_REF_SLUG}
extends:
- .container_builds
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Tags use the git tag, not the slug
container_image_tagged:
variables:
KANIKO_DESTINATION: $CI_REGISTRY_IMAGE/renovate:${CI_COMMIT_TAG}
extends:
- .container_builds
rules:
- if: '$CI_COMMIT_TAG'
......@@ -11,7 +11,7 @@ include:
ref: v1.20.0 # renovate:managed
file: 'kaniko.yml'
container_image_build:
.container_builds:
stage: release
variables:
KANIKO_BUILD_FILE: Dockerfile.alt # Defaults to Dockerfile
......@@ -19,7 +19,24 @@ container_image_build:
--build-arg GL_ASDF_TFLINT_VERSION
--build-arg GL_ASDF_GOLANG_VERSION
--build-arg GL_DEDICATED_CONTAINER_IMAGE_VERSION_PREFIXED
KANIKO_DESTINATION: $CI_REGISTRY_IMAGE/onboard:${CI_COMMIT_REF_SLUG}
extends:
- .kaniko_base
container_image_build:
variables:
KANIKO_DESTINATION: $CI_REGISTRY_IMAGE/onboard:${CI_COMMIT_REF_SLUG}
extends:
- .container_builds
rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# Tags use the git tag, not the slug
container_image_tagged:
variables:
KANIKO_DESTINATION: $CI_REGISTRY_IMAGE/onboard:${CI_COMMIT_TAG}
extends:
- .container_builds
rules:
- if: '$CI_COMMIT_TAG'
```
......@@ -21,7 +21,3 @@
key: ${CI_JOB_NAME}
paths:
- /cache
rules:
- if: '$CI_COMMIT_TAG'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH