Skip to content
Snippets Groups Projects
Commit 1ae00ad8 authored by Dimitrios Giannopoulos's avatar Dimitrios Giannopoulos
Browse files

fix: added multi tag image build

parent f3c29635
No related branches found
No related tags found
1 merge request!36Fix/multi tag image
Pipeline #7244 passed
...@@ -15,13 +15,20 @@ ...@@ -15,13 +15,20 @@
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] entrypoint: [""]
script: script:
- export DOCKER_TAG=$APP_VERSION
- | - |
if [ "$CI_COMMIT_REF_NAME" = "main" ]; then if [ "$CI_COMMIT_REF_NAME" = "fix/multi-tag-image" ]; then
echo "Pushing Docker image with tag 'latest'" echo "Pushing Docker image with tag 'latest'"
export DOCKER_TAG=latest /kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:$APP_VERSION"
--destination "${CI_REGISTRY_IMAGE}:latest"
else
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/Dockerfile"
--destination "${CI_REGISTRY_IMAGE}:$APP_VERSION"
fi fi
- /kaniko/executor --context "${CI_PROJECT_DIR}" --dockerfile "${CI_PROJECT_DIR}/Dockerfile" --destination "${CI_REGISTRY_IMAGE}:$APP_VERSION"
.angular_build: .angular_build:
extends: .default extends: .default
......
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