Skip to content
Snippets Groups Projects
Commit f2040b5a authored by Santiago Ospina De Los Ríos's avatar Santiago Ospina De Los Ríos
Browse files

Tag an image with the git tag name for facility

parent facdd5e5
No related branches found
No related tags found
1 merge request!49Resolve "Finish installation and usage instruction on the documentation"
Pipeline #33502 failed
......@@ -33,7 +33,7 @@ stages:
DUNECI_OS: debian
BASE_IMAGE: debian:10
DEPENDENCIES_IMAGE: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${TOOLCHAIN}-${BASE_IMAGE_VERSION}
DEPLOY_LATEST: "true"
MASTER_IMAGE: "true"
.debian_clang: &debian_clang
<<: *global_variables
......@@ -146,11 +146,17 @@ stages:
-t ${DOCKER_DEPLOY_IMAGE} .
# push images into registry
- docker push ${DOCKER_DEPLOY_IMAGE}
# set alternative and simpler names
- |
if [[ "$CI_COMMIT_BRANCH" == "latest" && ! -z "${DEPLOY_LATEST}" ]]
then
docker tag ${DOCKER_DEPLOY_IMAGE} ${CI_REGISTRY}/copasi/dune-copasi/dune-copasi:latest
docker push ${CI_REGISTRY}/copasi/dune-copasi/dune-copasi:latest
if [[ ! -z "${MASTER_IMAGE}" ]]; then
DOCKER_TAG=${CI_REGISTRY}/copasi/dune-copasi/dune-copasi:${CI_COMMIT_REF_NAME}
docker tag ${DOCKER_DEPLOY_IMAGE} ${DOCKER_TAG}
docker push ${DOCKER_TAG}
if [[ "$CI_COMMIT_BRANCH" == "latest" ]]; then
DOCKER_TAG=${CI_REGISTRY}/copasi/dune-copasi/dune-copasi:latest
docker tag ${DOCKER_DEPLOY_IMAGE} ${DOCKER_TAG}
docker push ${DOCKER_TAG}
fi
fi
- docker logout ${CI_REGISTRY}/copasi/dune-copasi
rules:
......
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