From 9c51d0945a0334146530499299ced9828dbeaae5 Mon Sep 17 00:00:00 2001 From: Pierre Smeyers <pierre.smeyers@gmail.com> Date: Tue, 26 Mar 2024 12:12:41 +0100 Subject: [PATCH] fix: kaniko-snapshot-image-cache input no longer dependent on another input --- README.md | 2 +- kicker.json | 3 +-- templates/gitlab-ci-docker.yml | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 17b60aa..b28d433 100644 --- a/README.md +++ b/README.md @@ -305,7 +305,7 @@ It is bound to the `package-build` stage, and uses the following variables: | `registry-mirror` / `DOCKER_REGISTRY_MIRROR` | URL of a Docker registry mirror to use during the image build (instead of default `https://index.docker.io`) <br>:warning: Used by the `kaniko` and `dind` options only | _(none)_ | | `container-registries-config-file` / `CONTAINER_REGISTRIES_CONFIG_FILE` | The [`registries.conf`](https://www.redhat.com/sysadmin/manage-container-registries) configuration to be used<br>:warning: Used by the `buildah` build only | _(none)_ | | `metadata` / `DOCKER_METADATA` | Additional `docker build`/`kaniko` arguments to set label | OCI Image Format Specification | -| `kaniko-snapshot-image-cache` / `KANIKO_SNAPSHOT_IMAGE_CACHE` | Snapshot image repository that will be used to store cached layers<br>:warning: Used by the `kaniko` build only | `${DOCKER_SNAPSHOT_IMAGE%:*}/cache` | +| `kaniko-snapshot-image-cache` / `KANIKO_SNAPSHOT_IMAGE_CACHE` | Snapshot image repository that will be used to store cached layers (leave empty to use default: snapshot image repository + `/cache`)<br>:warning: Used by the `kaniko` build only | _none_ (default cache path) | | `build-cache-disabled` / `DOCKER_BUILD_CACHE_DISABLED` | Set to `true` to disable the build cache.<br/>Cache can typically be disabled when there is a network latency between the container registry and the runner. | _none_ (i.e cache enabled) | This job produces _output variables_ that are propagated to downstream jobs (using [dotenv artifacts](https://docs.gitlab.com/ee/ci/pipelines/job_artifacts.html#artifactsreportsdotenv)): diff --git a/kicker.json b/kicker.json index 6e62433..39ff233 100644 --- a/kicker.json +++ b/kicker.json @@ -112,8 +112,7 @@ }, { "name": "KANIKO_SNAPSHOT_IMAGE_CACHE", - "description": "Snapshot image repository that will be used to store cached layers.\n\n_Used by the `kaniko` build only_", - "default": "${DOCKER_SNAPSHOT_IMAGE%:*}/cache", + "description": "Snapshot image repository that will be used to store cached layers (leave empty to use default: snapshot image repository + `/cache`)\n\n_Used by the `kaniko` build only_", "advanced": true }, { diff --git a/templates/gitlab-ci-docker.yml b/templates/gitlab-ci-docker.yml index e480847..a5b9ca2 100644 --- a/templates/gitlab-ci-docker.yml +++ b/templates/gitlab-ci-docker.yml @@ -120,10 +120,10 @@ spec: default: '' kaniko-snapshot-image-cache: description: |- - Snapshot image repository that will be used to store cached layers. + Snapshot image repository that will be used to store cached layers (leave empty to use default: snapshot image repository + `/cache`) _Used by the `kaniko` build only_ - default: ${DOCKER_SNAPSHOT_IMAGE%:*}/cache + default: '' hadolint-disabled: description: Disable Hadolint type: boolean -- GitLab