-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
98 lines (90 loc) · 2.64 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
stages:
- image
- build
- publish
variables:
MAVEN_OPTS: "-Xmx2g -XX:ReservedCodeCacheSize=512m"
JAVA_VERSION_MAJOR: "7"
XROOT_CLIENT_VERSION: "4.8.4-c201f"
LCG_VIEW: "LCG_94"
LCG_VERSION: "x86_64-centos7-gcc7-opt"
.krb_tgt_template: &krbtgt
before_script:
- echo "$KERB_ACCOUNT_PASSWORD" | kinit "[email protected]"
- klist
build-docker-image:
stage: image
only:
- /^docker-.*$/
tags:
- docker-image-build
script:
- echo "Building docker image..."
variables:
CONTEXT_DIR: docker
DOCKER_FILE: Dockerfile
TO: ${CI_REGISTRY_IMAGE}/base:latest
make-compile-test-step-dockerfile-jdk11:
<<: *krbtgt
stage: build
# use docker image base:latest with all libraries packaged
image: ${CI_REGISTRY_IMAGE}/base:latest
variables:
JAVA_HOME: /usr/lib/jvm/java-11
script:
# Make compile and test
- make all
# Final rename
- for f in *.jar; do mv "${f}" "${f%-jar-with-dependencies.jar}.jar"; done
artifacts:
paths:
- "*.jar"
make-compile-test-step-dockerfile:
<<: *krbtgt
stage: build
# use docker image base:latest with all libraries packaged
image: ${CI_REGISTRY_IMAGE}/base:latest
script:
# Make compile and test
- make all
# Final rename
- for f in *.jar; do mv "${f}" "${f%-jar-with-dependencies.jar}.jar"; done
artifacts:
paths:
- "*.jar"
make-compile-test-step-cvmfs:
<<: *krbtgt
tags:
- cvmfs
stage: build
# use clean cc7-base docker image with CVMFS for packages
image: gitlab-registry.cern.ch/linuxsupport/cc7-base:latest
script:
# Prepare build environment
- yum install -y which HEP_OSlibs
- source /cvmfs/sft.cern.ch/lcg/views/$LCG_VIEW/$LCG_VERSION/setup.sh
- XROOTD_LIB64_PATH="/cvmfs/sft.cern.ch/lcg/releases/xrootd/$XROOT_CLIENT_VERSION/$LCG_VERSION/lib64"
- XROOTD_INCLUDE_PATH="/cvmfs/sft.cern.ch/lcg/views/$LCG_VIEW/$LCG_VERSION/include/xrootd"
# Make compile and test
- MAVEN_FLAGS="-Dxrootd.lib64.path=${XROOTD_LIB64_PATH} -Dxrootd.include.path=${XROOTD_INCLUDE_PATH}" make all
# Final rename
- for f in *.jar; do mv "${f}" "${f%-jar-with-dependencies.jar}-${LCG_VERSION}.jar"; done
artifacts:
paths:
- "*.jar"
put-s3:
stage: publish
only:
- master
- qa
script:
- mkdir public
- mv *.jar public/
- yum -y install s3cmd
- echo "[default]" > $HOME/.s3cfg
- echo "access_key=" $S3_ACCESS_KEY >> $HOME/.s3cfg
- echo "secret_key=" $S3_SECRET_KEY >> $HOME/.s3cfg
- echo "host_base=s3.cern.ch" >> $HOME/.s3cfg
- echo "host_bucket=%(bucket)s.s3.cern.ch" >> $HOME/.s3cfg
- cd public
- s3cmd put *.jar s3://${S3_PATH} --acl-public