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 ...@@ -44,6 +44,8 @@ set -x
set -e set -e
export VERSION=$_VERSION export VERSION=$_VERSION
source $(cd `dirname "${BASH_SOURCE[0]}"` && pwd)/version.sh
IMAGE_NAME_VERSION=`image_name $VERSION`
cleanup () { cleanup () {
exit_code=$? exit_code=$?
...@@ -65,13 +67,18 @@ then ...@@ -65,13 +67,18 @@ then
trap cleanup EXIT ERR INT TERM trap cleanup EXIT ERR INT TERM
fi fi
if [ -z "${GIT_BRANCH}" ] if [ -z "$CI_COMMIT_TAG" ]
then then
GIT_BRANCH=${CI_COMMIT_REF_NAME} if [ -z "${GIT_BRANCH}" ]
then
GIT_BRANCH=${CI_COMMIT_REF_NAME}
fi
else
GIT_BRANCH=release
fi fi
export DOCKER_IMAGE=b2safe_${GIT_BRANCH}_${VERSION}:latest export DOCKER_IMAGE=${IMAGE_NAME_VERSION}
IMAGE_NAME=${REGISTRY}/${DOCKER_IMAGE} IMAGE_NAME=${REGISTRY}/${IMAGE_NAME_VERSION}
if [ -z "${SECRET_DIR}" ] if [ -z "${SECRET_DIR}" ]
then 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