Skip to content
Snippets Groups Projects
Unverified Commit 95f97a3b authored by Varac's avatar Varac
Browse files

timelimit-server: fix image tag

parent 7937ef04
No related branches found
No related tags found
No related merge requests found
Pipeline #244357 failed
......@@ -25,9 +25,11 @@ include:
- |
# No dashes allowes in bash variable names
GIT_TAG_VAR="GIT_TAG_${BUILD_DIR//-/_}"
export $GIT_TAG_VAR
if [ -n "${!GIT_TAG_VAR}" ]; then
IMAGE_TAG="${!GIT_TAG_VAR}"
export IMAGE_TAG="${!GIT_TAG_VAR}"
fi
- |
if [ -z ${IMAGE_TAG+x} ]; then
if [ "$CI_COMMIT_REF_NAME" = $CI_DEFAULT_BRANCH ]; then
VERSION="latest"
......@@ -41,13 +43,15 @@ include:
VERSION="branch-$SANITIZED"
fi
export IMAGE_TAG=$CI_REGISTRY_IMAGE:$VERSION
else
export IMAGE_TAG=$CI_REGISTRY_IMAGE:$IMAGE_TAG
fi
- export BUILD_DIR=${BUILD_DIR:-$CI_JOB_NAME}
- |
URL_VAR="GIT_URL_${BUILD_DIR//-/_}"
if [ -n "${!URL_VAR}" ]; then
dnf install -y git
git clone "${!URL_VAR}"
git clone --depth 1 --branch "${!GIT_TAG_VAR}" "${!URL_VAR}"
fi
- cd $BUILD_DIR
- export image="${CI_REGISTRY_IMAGE}/$BUILD_DIR"
......
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