Add push opt to custom build

This commit is contained in:
Andrejs Cunskis 2022-05-10 17:30:37 +03:00
parent 1c07a37ea3
commit d1f562aaca
No known key found for this signature in database
GPG key ID: 87CB75083F227241

View file

@ -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: