-
Notifications
You must be signed in to change notification settings - Fork 36
/
Copy path.gitlab-ci.yml
242 lines (219 loc) · 5.62 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
stages:
- build
- test
- publish
#--------------------------
# Build templates
#--------------------------
.build-fedora-template: &build-fedora-template_definition
stage: build
script:
- ci/fedora/packages.sh
- ci/common-rpm-build.sh
- mkdir ${CI_JOB_NAME}
- cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME}
- tree ${CI_JOB_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
#--------------------------
# Build jobs
#--------------------------
cmake-from-tarball:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
script:
- ci/fedora/packages.sh
- git submodule update --init --recursive
- packaging/make-srpm.sh
- dnf install -y epel-release
- dnf builddep -y build/SRPMS/*
- packaging/make-dist.sh
- cd build/
- tar xf davix-*.tar.gz
- cd davix-*/
- mkdir build/ && cd build/
- cmake ../
source-tarball:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
script:
- dnf install -y git python3
- packaging/make-dist.sh
- mv -v build/davix-*.tar.gz .
artifacts:
paths:
- davix-*.tar.gz
rules:
- if: '$CI_COMMIT_TAG != null'
- if: '$CI_COMMIT_TAG == null'
when: manual
allow_failure: true
binary-tarball:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
script:
- ci/fedora/packages.sh
- packaging/make-binary-dist.sh
- tree binary-tarball/ --filelimit 10
artifacts:
paths:
- davix-*.tar.gz
rules:
- if: '$CI_COMMIT_TAG != null'
- if: '$CI_COMMIT_TAG == null'
when: manual
allow_failure: true
alma8:
image: gitlab-registry.cern.ch/linuxsupport/alma8-base
<<: *build-fedora-template_definition
alma9:
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
<<: *build-fedora-template_definition
fedora-39:
image: fedora:39
<<: *build-fedora-template_definition
fedora-40:
image: fedora:40
<<: *build-fedora-template_definition
fedora-rawhide:
image: fedora:rawhide
<<: *build-fedora-template_definition
allow_failure: true
ubuntu-focal:
stage: build
image: ubuntu:focal
script:
- ci/debian/packages.sh
- apt install -y python2
- packaging/make-deb.sh
- mkdir ${CI_JOB_NAME}
- cp -r build/debian-build-arena/*.{deb,ddeb,dsc} ${CI_JOB_NAME}
variables:
DEBIAN_FRONTEND: "noninteractive"
artifacts:
paths:
- "$CI_JOB_NAME"
debian-buster:
stage: build
image: debian:buster
script:
- ci/debian/packages.sh
- packaging/make-deb.sh
- mkdir ${CI_JOB_NAME}
- cp -r build/debian-build-arena/*.{deb,dsc} ${CI_JOB_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
docs-generate:
stage: build
image: fedora:34
script:
- dnf install -y git python3-sphinx python3-pip gcc-c++ rpm-build dnf-plugins-core python2 python3-breathe make
- packaging/make-docs.sh
- mv build/doc/build/html docs
artifacts:
paths:
- docs
#--------------------------
# Test jobs
#--------------------------
alma8-test:
stage: test
image: gitlab-registry.cern.ch/linuxsupport/alma8-base
needs:
- job: alma8
script:
- dnf install -y epel-release
- dnf install -y alma8/RPMS/*.rpm
- davix-unit-tests
alma9-test:
stage: test
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
needs:
- job: alma9
script:
- dnf install -y epel-release
- dnf install -y alma9/RPMS/*.rpm
- davix-unit-tests
fedora-39-test:
stage: test
image: fedora:39
needs:
- job: fedora-39
script:
- dnf install -y fedora-39/RPMS/*.rpm
- davix-unit-tests
fedora-40-test:
stage: test
image: fedora:40
needs:
- job: fedora-40
script:
- dnf install -y fedora-40/RPMS/*.rpm
- davix-unit-tests
#--------------------------
# Publish jobs
#--------------------------
docs:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/alma9:latest
dependencies:
- docs-generate
script:
- automount
- cat "$DAVIXCI_PW" | kinit davixci
- SNAPSHOT=$(date +%s)
- TARGET="/eos/project-d/davix/www/docs/${CI_COMMIT_REF_NAME}"
- STAGING_AREA="$TARGET-${SNAPSHOT}"
- cp -r docs "$STAGING_AREA"
- ci/replace-directory.sh "$STAGING_AREA" "$TARGET"
tags:
- docker-privileged-xl
retry: 2
only:
- branches@dmc/davix
- tags@dmc/davix
rpms:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/alma9:latest
dependencies:
- alma8
- alma9
script:
- automount
- cat "$STCI_PASSWORD" | kinit stci
- for platform in alma8 alma9; do packaging/repo-manager.py --action add --base /eos/project-s/storage-ci/www/davix --ref ${CI_COMMIT_REF_NAME} --packages ${platform}/RPMS/* ${platform}/SRPMS/* ; done
tags:
- docker-privileged-xl
retry: 2
only:
- branches@dmc/davix
- tags@dmc/davix
rpms-dmc:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/alma9:latest
dependencies:
- alma8
- alma9
- fedora-39
- fedora-40
- fedora-rawhide
script:
- automount
- cat "$STCI_PASSWORD" | kinit stci
- declare -A DISTMAP=( [alma8]=el8 [alma9]=el9 [fedora-39]=fc39 [fedora-40]=fc40 [fedora-rawhide]=fc-rawhide )
- if [[ -z $CI_COMMIT_TAG ]]; then BUILD="testing" ; else BUILD="rc" ; fi
- |
for platform in alma8 alma9 fedora-39 fedora-40 fedora-rawhide ; do
dist=${DISTMAP[${platform}]};
cp -nv ${platform}/RPMS/* ${platform}/SRPMS/* /eos/project-d/dmc/www/repos/${BUILD}/${dist}/x86_64 || true;
packaging/update-repo.sh /eos/project-d/dmc/www/repos/${BUILD}/${dist}/x86_64;
done
tags:
- docker-privileged-xl
retry: 2
only:
- master@dmc/davix
- devel@dmc/davix
- tags@dmc/davix