Commit 9f156338 authored by Adelina Eleonora Lintuluoto's avatar Adelina Eleonora Lintuluoto
Browse files

CI transform IMAGE_NAME to lowercase to please docker image naming rules

parent 2f65f837
......@@ -54,12 +54,12 @@ check_changes_pipeline:
entrypoint: [""]
- export DATE=$(date +"%Y-%m-%d")
- export RELEASE_LOW=$(echo $RELEASE | tr '[:upper:]' '[:lower:]') # Release is given in lower case to please docker image naming rules, however Dockerfile expects the release in upper case.
- export IMAGE_NAME=$(echo $IMAGE_NAME | tr '[:upper:]' '[:lower:]') # IMAGE_NAME is given in lowercase to please docker image naming rules
- echo "Pipeline source - $CI_PIPELINE_SOURCE"
- echo "Building image - $IMAGE_NAME"
- printf "Release - $RELEASE\nScram Arch - $SCRAM_ARCH\nBase image - $BASE_IMAGE\n"
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/$REPO_NAME --dockerfile $CI_PROJECT_DIR/$REPO_NAME/Dockerfile --destination $CI_REGISTRY_IMAGE/$RELEASE_LOW-$SCRAM_ARCH:$DATE-$CI_COMMIT_SHORT_SHA --build-arg=BUILD_DATE="$DATE" --build-arg=VERSION="$DATE" --build-arg=VCS_URL="$CI_REPOSITORY_URL" --build-arg=VCS_REF="$CI_COMMIT_SHORT_SHA" --build-arg BASEIMAGE="$BASE_IMAGE" --build-arg SCRAM_ARCH="$SCRAM_ARCH" --build-arg CMSSW_VERSION="$RELEASE"
- /kaniko/executor --context $CI_PROJECT_DIR/$REPO_NAME --dockerfile $CI_PROJECT_DIR/$REPO_NAME/Dockerfile --destination $CI_REGISTRY_IMAGE/$IMAGE_NAME:$DATE-$CI_COMMIT_SHORT_SHA --build-arg=BUILD_DATE="$DATE" --build-arg=VERSION="$DATE" --build-arg=VCS_URL="$CI_REPOSITORY_URL" --build-arg=VCS_REF="$CI_COMMIT_SHORT_SHA" --build-arg BASEIMAGE="$BASE_IMAGE" --build-arg SCRAM_ARCH="$SCRAM_ARCH" --build-arg CMSSW_VERSION="$RELEASE"
<<: *test_all
......@@ -95,6 +95,7 @@ build_standalone_pipeline:
- docker-privileged-xl
REPO_NAME: standalone
# Necessary variables to be passed to Dockerfile for building a standalone image is CMSSW_VERSION=$RELEASE,
Supports Markdown
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