Skip to content
Snippets Groups Projects
Verified Commit ab6d93de authored by Konrad Botor's avatar Konrad Botor
Browse files

Updated publishing script to publish the minimal image

parent 439abe11
No related branches found
No related tags found
2 merge requests!827Merge develop changes to master,!672Updated publishing script to publish the minimal image
......@@ -32,7 +32,7 @@ variables:
include:
- project: hive/haf
ref: af7101337e730655a6f7821f7840c17596d30c98 # develop
ref: 4e9bfea03ef9511984f3ed54c6181d05b24cd960 # develop
file: /scripts/ci-helpers/prepare_data_image_job.yml # implicitly pulls base.gitlab-ci.yml from common-ci-configuration
......
Subproject commit af7101337e730655a6f7821f7840c17596d30c98
Subproject commit 4e9bfea03ef9511984f3ed54c6181d05b24cd960
......@@ -75,6 +75,7 @@ pwd
CI_IMAGE_TAG=${CI_IMAGE_TAG:-"python-3.8-slim-1"} # see scripts/ci/build_ci_base_image.sh for the current tag
BUILD_OPTIONS=("--platform=linux/amd64" "--target=instance" "--progress=plain")
TAG="${REGISTRY}instance:$BUILD_IMAGE_TAG"
MINIMAL_TAG="${REGISTRY}minimal-instance:$BUILD_IMAGE_TAG"
# On CI push the images to the registry
if [[ -n "${CI:-}" ]]; then
......@@ -124,6 +125,13 @@ docker buildx build "${BUILD_OPTIONS[@]}" \
--tag "$TAG" \
--file Dockerfile .
# Since CI pushes the image directly to the registry, it needs to be pulled to be tagged
if [[ -n "${CI:-}" ]]; then
docker pull "$TAG"
fi
docker tag "$TAG" "$MINIMAL_TAG"
[[ -n "${DOT_ENV_FILENAME:-}" ]] && echo "${DOTENV_VAR_NAME:-IMAGE}=$TAG" > "$DOT_ENV_FILENAME"
popd
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment