From d1f562aacad8f53cc0147998ec7a2d0a9812313c Mon Sep 17 00:00:00 2001 From: Andrejs Cunskis Date: Tue, 10 May 2022 17:30:37 +0300 Subject: [PATCH] Add push opt to custom build --- .gitlab/ci/custom.images.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/custom.images.yml b/.gitlab/ci/custom.images.yml index dbe2e4d..572f832 100644 --- a/.gitlab/ci/custom.images.yml +++ b/.gitlab/ci/custom.images.yml @@ -4,7 +4,16 @@ # Hack to set an array in /bin/sh # http://unix.stackexchange.com/a/137571 - set -- $CI_JOB_NAME - - docker buildx build --cache-from="$CI_REGISTRY_IMAGE:$1" --cache-to=type=inline --label "ci_pipeline_url=$CI_PIPELINE_URL" --label "ci_job_url=$CI_JOB_URL" -t "$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" . + - | + docker buildx build \ + --cache-to=type=inline \ + --cache-from="$CI_REGISTRY_IMAGE:$1" \ + --push="${PUSH_CUSTOM_IMAGE}" \ + --label "ci_pipeline_url=$CI_PIPELINE_URL" \ + --label "ci_job_url=$CI_JOB_URL" \ + -t "$CI_REGISTRY_IMAGE:$1" \ + -f "Dockerfile.$1" \ + . # Used by https://gitlab.com/gitlab-org/charts/auto-deploy-app/-/blob/master/.gitlab-ci.yml alpine-helm: