Commit e9dd4a3c authored by Stefan Wolfsheimer's avatar Stefan Wolfsheimer Committed by Stefan Wolfsheimer
Browse files

fixed: determine version name of image

parent af2a02be
......@@ -44,6 +44,8 @@ set -x
set -e
export VERSION=$_VERSION
source $(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/version.sh
IMAGE_NAME_VERSION=`image_name $VERSION`
cleanup () {
exit_code=$?
......@@ -65,13 +67,18 @@ then
trap cleanup EXIT ERR INT TERM
fi
if [ -z "${GIT_BRANCH}" ]
if [ -z "$CI_COMMIT_TAG" ]
then
GIT_BRANCH=${CI_COMMIT_REF_NAME}
if [ -z "${GIT_BRANCH}" ]
then
GIT_BRANCH=${CI_COMMIT_REF_NAME}
fi
else
GIT_BRANCH=release
fi
export DOCKER_IMAGE=b2safe_${GIT_BRANCH}_${VERSION}:latest
IMAGE_NAME=${REGISTRY}/${DOCKER_IMAGE}
export DOCKER_IMAGE=${IMAGE_NAME_VERSION}
IMAGE_NAME=${REGISTRY}/${IMAGE_NAME_VERSION}
if [ -z "${SECRET_DIR}" ]
then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment