forked from PocketCoffea/PocketCoffea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
133 lines (112 loc) · 3.98 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
stages:
- build
- tag
include:
- project: 'cms-analysis/general/container-image-ci-templates'
file:
- 'kaniko-image.gitlab-ci.yml'
- 'skopeo.gitlab-ci.yml'
variables:
CONTEXT_DIR: ""
DOCKER_FILE_NAME: "Dockerfile"
GIT_SUBMODULE_STRATEGY: recursive
PUSH_IMAGE: "true"
ACCELERATED_IMAGE: "true"
BUILD_ARGS: ""
SCAN_IMAGE: "false"
.build_docker_template:
extends: .build_kaniko
only:
- pushes
- merge_requests
- coffea_2023
- main
- stable
#--------------------------------------------------------------------
# Build images and tag with short commit SHA
#build_docker_infn_facility:
# extends: .build_docker_template
# variables:
# BUILD_ARGS: "FROM_IMAGE=dciangot/jlab-rclone:v7 CLUSTER=INFN"
# REGISTRY_IMAGE_PATH: ${CI_REGISTRY_IMAGE}:infn-${CI_COMMIT_SHORT_SHA}
build_docker_lxplus_cc7:
extends: .build_docker_template
variables:
BUILD_ARGS: "FROM_IMAGE=gitlab-registry.cern.ch/batch-team/dask-lxplus/lxdask-cc7:latest CLUSTER=lxplus-cc7"
REGISTRY_IMAGE_PATH: ${CI_REGISTRY_IMAGE}:lxplus-cc7-${CI_COMMIT_SHORT_SHA}
build_docker_lxplus_el9:
extends: .build_docker_template
variables:
BUILD_ARGS: "FROM_IMAGE=gitlab-registry.cern.ch/batch-team/dask-lxplus/lxdask-al9:latest CLUSTER=lxplus-el9"
REGISTRY_IMAGE_PATH: ${CI_REGISTRY_IMAGE}:lxplus-el9-${CI_COMMIT_SHORT_SHA}
#--------------------------------------------------------------------
# Tag images on default branch as latest
#build_docker_infn_facility_latest:
# extends: .tag_skopeo
# rules:
# - if: '$CI_COMMIT_REF_NAME == "main"'
# variables:
# IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:infn-${CI_COMMIT_SHORT_SHA}
# IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:infn-latest
build_docker_lxplus_cc7_latest:
extends: .tag_skopeo
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
variables:
IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:lxplus-cc7-${CI_COMMIT_SHORT_SHA}
IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:lxplus-cc7-latest
build_docker_lxplus_el9_latest:
extends: .tag_skopeo
rules:
- if: '$CI_COMMIT_REF_NAME == "main"'
variables:
IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:lxplus-el9-${CI_COMMIT_SHORT_SHA}
IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:lxplus-el9-latest
#-----------------------------
# Tag images on stable branch
#build_docker_infn_facility_stable:
# extends: .tag_skopeo
# rules:
# - if: '$CI_COMMIT_REF_NAME == "stable"'
# variables:
# IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:infn-${CI_COMMIT_SHORT_SHA}
# IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:infn-stable
build_docker_lxplus_cc7_stable:
extends: .tag_skopeo
rules:
- if: '$CI_COMMIT_REF_NAME == "stable"'
variables:
IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:lxplus-cc7-${CI_COMMIT_SHORT_SHA}
IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:lxplus-cc7-stable
build_docker_lxplus_el9_stable:
extends: .tag_skopeo
rules:
- if: '$CI_COMMIT_REF_NAME == "stable"'
variables:
IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:lxplus-el9-${CI_COMMIT_SHORT_SHA}
IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:lxplus-el9-stable
#----------------------------------
# Tag images on coffea2023 branch
build_docker_lxplus_coffea2023:
extends: .tag_skopeo
rules:
- if: '$CI_COMMIT_REF_NAME == "coffea_2023"'
variables:
IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:lxplus-el9-${CI_COMMIT_SHORT_SHA}
IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:lxplus-el9-coffea2023
#-------------------------------------------------------------------
# Tag images using git tag
#build_docker_infn_facility_tagged:
# extends: .tag_skopeo
# rules:
# - if: $CI_COMMIT_TAG
# variables:
# IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:infn-${CI_COMMIT_SHORT_SHA}
# IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:infn-${CI_COMMIT_TAG}
build_docker_lxplus_tagged:
extends: .tag_skopeo
rules:
- if: $CI_COMMIT_TAG
variables:
IMAGE_ORIGIN_TAG: ${CI_REGISTRY_IMAGE}:lxplus-${CI_COMMIT_SHORT_SHA}
IMAGE_DESTINATION_TAG: ${CI_REGISTRY_IMAGE}:lxplus-cc7-${CI_COMMIT_TAG}