-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.gitlab-ci.yml
115 lines (103 loc) · 2.94 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
stages:
- build_1
- build_2
- build_3
# Reference:
# https://gitlab.cern.ch/gitlabci-examples/build_docker_image/-/blob/daeca041733e2af279df38a3b9e8123111c62871/.gitlab-ci.yml
build_cms_grid:
stage: build_1
variables:
IMAGE_DESTINATION: ${CI_REGISTRY_IMAGE}:cms_grid
IMAGECACHE_DESTINATION: ${CI_REGISTRY_IMAGE}/cms_grid_cache
image:
name: gitlab-registry.cern.ch/ci-tools/docker-image-builder
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --context $CI_PROJECT_DIR/cms_grid --dockerfile $CI_PROJECT_DIR/cms_grid/Dockerfile --destination $IMAGE_DESTINATION --cache=true --cache-repo $IMAGECACHE_DESTINATION
- echo "Image pushed successfully to ${IMAGE_DESTINATION}"
# Reference:
# https://gitlab.cern.ch/ci-tools/docker-image-builder/-/blob/b756ab0a85983439cd241457ce33bc7e5f940b86/README.md
build_jenkins_python:
stage: build_1
tags:
- docker-image-build
script:
- docker build -t jenkins_python .
variables:
TO: $CI_REGISTRY_IMAGE:jenkins_python
CONTEXT_DIR: jenkins_python
DOCKER_FILE: Dockerfile
FROM: python:2
build_jenkins_python3:
stage: build_1
tags:
- docker-image-build
script:
- docker build -t jenkins_python3 .
variables:
TO: $CI_REGISTRY_IMAGE:jenkins_python3
CONTEXT_DIR: jenkins_python
DOCKER_FILE: py3.Dockerfile
FROM: python:3.8.2
build_wmcore_pylint:
stage: build_1
tags:
- docker-image-build
script:
- docker build -t wmcore_pylint .
variables:
TO: $CI_REGISTRY_IMAGE:wmcore_pylint
CONTEXT_DIR: wmcore_pylint
FROM: python:3.8.2-slim
build_crab_staticanalysis:
stage: build_1
tags:
- docker-image-build
script:
- docker build -t crab_staticanalysis .
variables:
TO: $CI_REGISTRY_IMAGE:crab_staticanalysis
CONTEXT_DIR: crab_staticanalysis
FROM: python:3.8.2-slim
build_wmcore_base:
stage: build_2
tags:
- docker-image-build
script:
- docker build -t wmcore_base .
variables:
TO: $CI_REGISTRY_IMAGE:wmcore_base
CONTEXT_DIR: wmcore_base
FROM: $CI_REGISTRY_IMAGE:cms_grid
build_wmcorepy3_tests:
stage: build_3
tags:
- docker-image-build
script:
- docker build -t wmcorepy3_tests .
variables:
TO: $CI_REGISTRY_IMAGE:wmcorepy3_tests
CONTEXT_DIR: wmcore_tests
DOCKER_FILE: Dockerfile
FROM: $CI_REGISTRY_IMAGE:wmcore_base
build_dbs_tests:
stage: build_3
tags:
- docker-image-build
script:
- docker build -t dbs_tests .
variables:
TO: $CI_REGISTRY_IMAGE:dbs_tests
CONTEXT_DIR: dbs_tests
FROM: $CI_REGISTRY_IMAGE:wmcore_base
build_crab_tests:
stage: build_3
tags:
- docker-image-build
script:
- docker build -t crab_tests .
variables:
TO: $CI_REGISTRY_IMAGE:crab_tests
CONTEXT_DIR: crab_tests
FROM: $CI_REGISTRY_IMAGE:wmcore_base