Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TreeMaker
cmssw-docker
Commits
152ddec7
Commit
152ddec7
authored
Apr 06, 2020
by
Alexx Perloff
Browse files
Add a GitLab CI/CD file.
parent
c77d4567
Pipeline
#1542265
failed
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
0 → 100644
View file @
152ddec7
# Stages ----------------------------------------------------------------------
stages
:
-
build
# Before Script ---------------------------------------------------------------
before_script
:
-
export DATE=$(date +"%Y-%m-%d")
# Variables -------------------------------------------------------------------
variables
:
COMMIT_HASH
:
$CI_COMMIT_SHORT_SHA
PROJ_NAME
:
'
TreeMaker-cmssw-$CI_COMMIT_REF_NAME-${REPO_NAME}'
# Job templates ---------------------------------------------------------------
.job_template
:
stage
:
build
variables
:
NO_CACHE
:
"
true"
CONTEXT_DIR
:
"
${REPO_NAME}/"
REPO_NAME
:
standalone
IMAGE_NAME
:
cmssw
TO
:
"
${CI_REGISTRY_IMAGE}/${IMAGE_NAME}:${CMSSW_VERSION}-${DATE}-${COMMIT_HASH}"
tags
:
-
docker-privileged-xl
image
:
name
:
gitlab-registry.cern.ch/ci-tools/docker-image-builder
entrypoint
:
[
"
"
]
script
:
# Build and push the image from the Dockerfile at the root of the project.
# To push to a specific docker tag, amend the --destination parameter, e.g. --destination $CI_REGISTRY_IMAGE:$CI_BUILD_REF_NAME
# See https://docs.gitlab.com/ee/ci/variables/predefined_variables.html#variables-reference for available variables
-
echo "Building standalone image $BASE_IMAGE with $CMSSW_VERSION and $SCRAM_ARCH"
-
echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
-
echo $CI_PROJECT_DIR/$CONTEXT_DIR/
-
ls -lh $CI_PROJECT_DIR/$CONTEXT_DIR/
-
/kaniko/executor --context $CI_PROJECT_DIR/$CONTEXT_DIR --dockerfile $CI_PROJECT_DIR/$CONTEXT_DIR/Dockerfile --destination $TO --build-arg=BUILD_DATE="$DATE" --build-arg=VERSION="$DATE" --build-arg=VCS_URL="$CI_REPOSITORY_URL" --build-arg=VCS_REF="$COMMIT_HASH" --build-arg BASEIMAGE="$BASE_IMAGE" --build-arg SCRAM_ARCH="$SCRAM_ARCH" --build-arg CMSSW_VERSION="$CMSSW_VERSION"
only
:
variables
:
-
$STANDALONE == "True" && $CMSSW_VERSION && $SCRAM_ARCH && $BASE_IMAGE
# Jobs/Includes ---------------------------------------------------------------
include
:
-
local
:
'
/standalone/.gitlab-ci.yml'
standalone/.gitlab-ci.yml
0 → 100644
View file @
152ddec7
build_TreeMaker_cmssw_standalone_CMSSW_10_2_21
:
extends
:
.job_template
variables
:
CMSSW_VERSION
:
CMSSW_10_2_21
SCRAM_ARCH
:
slc7_amd64_gcc700
BASE_IMAGE
:
clelange/cc7-cms:latest
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment