Commit 77be5d35 authored by Clemens Lange's avatar Clemens Lange
Browse files

Merge branch 'ci' into 'master'

CI move date into script

See merge request cms-cloud/cmssw-docker!14
parents 955a1503 f7f65534
......@@ -2,9 +2,6 @@ stages:
- check
- build
before_script:
- export DATE=$(date +"%Y-%m-%d")
check_changed_files:
stage: check
only:
......@@ -21,11 +18,12 @@ check_changed_files:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- export DATE=$(date +"%Y-%m-%d")
- 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/$IMAGE_NAME:$IMAGE_TAG --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:${IMAGE_TAG}$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"
build_cms_cvmfs_pipeline:
<<: *build_image
......@@ -35,7 +33,6 @@ build_cms_cvmfs_pipeline:
- $IMAGE_NAME
variables:
REPO_NAME: $IMAGE_NAME
IMAGE_TAG: $DATE-$CI_COMMIT_SHORT_SHA
build_standalone_pipeline:
<<: *build_image
......@@ -48,5 +45,5 @@ build_standalone_pipeline:
variables:
IMAGE_NAME: cmssw
REPO_NAME: standalone
IMAGE_TAG: $RELEASE-$SCRAM_ARCH-$DATE-$CI_COMMIT_SHORT_SHA
IMAGE_TAG: $RELEASE-$SCRAM_ARCH-
BASE_IMAGE: "clelange/$OS-cms:latest"
\ No newline at end of file
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