.gitlab-ci.yml 9.44 KB
Newer Older
1
stages:
2
- deps
3
- build
4
- publish
5

6
7
deps-slc6:
  stage: deps
Georgios Bitzes's avatar
Georgios Bitzes committed
8
9
10
11
  image: gitlab-registry.cern.ch/linuxsupport/slc6-base
  script:
    - yum install -y curl rpmdevtools python-devel python-setuptools sudo tar yum-plugin-priorities yum-utils sl-release-scl
    - curl http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo > /etc/yum.repos.d/slc6-devtoolset.repo
12
    - yum clean all
13
14
    - yum-builddep -y eos-folly-deps.spec
    - spectool -g -R eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
15
    - mkdir -p ~/rpmbuild/SOURCES
16
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
17
    - rpmbuild -ba eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
18
19
20
21
22
23
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

24
25
deps-cc7:
  stage: deps
Georgios Bitzes's avatar
Georgios Bitzes committed
26
27
28
  image: gitlab-registry.cern.ch/linuxsupport/cc7-base
  script:
    - yum install -y rpmdevtools python-devel python-setuptools sudo tar yum-plugin-priorities yum-utils centos-release-scl
29
    - yum-builddep -y eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
30
    - mkdir -p ~/rpmbuild/SOURCES
31
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
32
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
33
34
35
36
37
38
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

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
deps-fedora-29:
  stage: deps
  image: fedora:29
  script:
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
    - dnf install -y dnf-plugins-core
    - dnf builddep -y eos-folly-deps.spec
    - mkdir -p ~/rpmbuild/SOURCES
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly-deps.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

deps-fedora-30:
  stage: deps
  image: fedora:30
  script:
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
    - dnf install -y dnf-plugins-core
    - dnf builddep -y eos-folly-deps.spec
    - mkdir -p ~/rpmbuild/SOURCES
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly-deps.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

71
72
deps-fedora-31:
  stage: deps
Georgios Bitzes's avatar
Georgios Bitzes committed
73
74
75
76
  image: fedora:31
  script:
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
    - dnf install -y dnf-plugins-core
77
    - dnf builddep -y eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
78
    - mkdir -p ~/rpmbuild/SOURCES
79
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
80
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
81
82
83
84
85
86
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

87
88
deps-fedora-31-tsan:
  stage: deps
Georgios Bitzes's avatar
Georgios Bitzes committed
89
90
91
92
  image: fedora:31
  script:
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
    - dnf install -y dnf-plugins-core libtsan
93
    - dnf builddep -y eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
94
    - mkdir -p ~/rpmbuild/SOURCES
95
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
96
    - rpmbuild -ba --undefine=_disable_source_fetch --define '_with_tsan 1' eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
97
98
99
100
101
102
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

103
104
deps-fedora-rawhide:
  stage: deps
Georgios Bitzes's avatar
Georgios Bitzes committed
105
106
107
  image: registry.fedoraproject.org/fedora:rawhide
  script:
    - dnf install --nogpg -y rpmdevtools python-devel python-setuptools sudo tar dnf-plugins-core
108
    - dnf builddep --nogpg -y eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
109
    - mkdir -p ~/rpmbuild/SOURCES
110
    - cp SConstruct.double-conversion ~/rpmbuild/SOURCES
111
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly-deps.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
112
113
114
115
116
117
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

118
119
120
121
slc6:
  stage: build
  image: gitlab-registry.cern.ch/linuxsupport/slc6-base
  script:
122
    - yum install -y curl rpmdevtools python-devel python-setuptools sudo tar yum-plugin-priorities yum-utils sl-release-scl
123
    - yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
124
125
126
127
    - curl http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo > /etc/yum.repos.d/slc6-devtoolset.repo
    - yum clean all
    - yum-builddep -y eos-folly.spec
    - spectool -g -R eos-folly.spec
128
    - mkdir -p ~/rpmbuild/SOURCES
129
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
130
131
    - rpmbuild -ba eos-folly.spec
    - mkdir "$CI_JOB_NAME"
Georgios Bitzes's avatar
Georgios Bitzes committed
132
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
133
134
135
136
137
138
139
  artifacts:
    paths:
    - "$CI_JOB_NAME"

cc7:
  stage: build
  image: gitlab-registry.cern.ch/linuxsupport/cc7-base
140
  dependencies:
141
  - deps-cc7
142
  script:
143
    - yum install -y rpmdevtools python-devel python-setuptools sudo tar yum-plugin-priorities yum-utils centos-release-scl
144
    - yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
145
    - yum-builddep -y eos-folly.spec
146
    - mkdir -p ~/rpmbuild/SOURCES
147
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
148
149
150
151
152
153
154
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

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
fedora-29:
  stage: build
  image: fedora:29
  dependencies:
  - deps-fedora-29
  script:
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
    - yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
    - dnf install -y dnf-plugins-core
    - dnf builddep -y eos-folly.spec
    - mkdir -p ~/rpmbuild/SOURCES
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

fedora-30:
  stage: build
  image: fedora:30
  dependencies:
  - deps-fedora-30
  script:
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
    - yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
    - dnf install -y dnf-plugins-core
    - dnf builddep -y eos-folly.spec
    - mkdir -p ~/rpmbuild/SOURCES
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"


Georgios Bitzes's avatar
Georgios Bitzes committed
194
fedora-31:
Georgios Bitzes's avatar
Georgios Bitzes committed
195
  stage: build
Georgios Bitzes's avatar
Georgios Bitzes committed
196
  image: fedora:31
197
  dependencies:
198
  - deps-fedora-31
Georgios Bitzes's avatar
Georgios Bitzes committed
199
  script:
200
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
201
    - yum install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
202
203
    - dnf install -y dnf-plugins-core
    - dnf builddep -y eos-folly.spec
204
    - mkdir -p ~/rpmbuild/SOURCES
205
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
206
207
208
209
210
211
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"
Georgios Bitzes's avatar
Georgios Bitzes committed
212

Georgios Bitzes's avatar
Georgios Bitzes committed
213
fedora-31-tsan:
214
  stage: build
Georgios Bitzes's avatar
Georgios Bitzes committed
215
  image: fedora:31
216
  dependencies:
217
  - deps-fedora-31-tsan
218
  script:
219
    - dnf install -y rpmdevtools python-devel python-setuptools sudo tar yum-utils
220
    - dnf install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
221
    - dnf install -y dnf-plugins-core libtsan
222
223
    - dnf builddep -y eos-folly.spec
    - mkdir -p ~/rpmbuild/SOURCES
224
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
225
226
227
228
229
230
231
    - rpmbuild -ba --undefine=_disable_source_fetch --define '_with_tsan 1' eos-folly.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"

232

Georgios Bitzes's avatar
Georgios Bitzes committed
233
234
fedora-rawhide:
  stage: build
235
  image: registry.fedoraproject.org/fedora:rawhide
236
  dependencies:
237
  - deps-fedora-rawhide
Georgios Bitzes's avatar
Georgios Bitzes committed
238
  script:
239
    - dnf install --nogpg -y rpmdevtools python-devel python-setuptools sudo tar dnf-plugins-core
240
    - dnf install -y deps-"$CI_JOB_NAME"/RPMS/x86_64/*
241
    - dnf builddep --nogpg -y eos-folly.spec
Georgios Bitzes's avatar
Georgios Bitzes committed
242
    - mkdir -p ~/rpmbuild/SOURCES
243
    - cp 0001-Apply-SLC6-patches.patch ~/rpmbuild/SOURCES
Georgios Bitzes's avatar
Georgios Bitzes committed
244
245
246
247
248
249
    - rpmbuild -ba --undefine=_disable_source_fetch eos-folly.spec
    - mkdir "$CI_JOB_NAME"
    - cp -r /root/rpmbuild/RPMS/ /root/rpmbuild/SRPMS/ "$CI_JOB_NAME"
  artifacts:
    paths:
    - "$CI_JOB_NAME"
250

251
publish:
Georgios Bitzes's avatar
Georgios Bitzes committed
252
  stage: publish
253
  image: gitlab-registry.cern.ch/linuxsupport/cc7-base
254
  dependencies:
255
256
  - deps-fedora-29
  - deps-fedora-30
257
258
259
  - deps-fedora-31
  - deps-fedora-31-tsan
  - deps-fedora-rawhide
260
261
  - fedora-29
  - fedora-30
262
263
264
265
266
267
268
  - fedora-31
  - fedora-31-tsan
  - fedora-rawhide
  tags:
  - docker_node
  retry: 2
  script:
269
  - yum install -y tree sudo sssd-client createrepo
270
  - sudo -u stci -s tree
271
272
  - sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-29 fc-29
  - sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-30 fc-30
273
274
275
  - sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-31 fc-31
  - sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-31-tsan fc-31-tsan
  - sudo -u stci -s ${PWD}/deploy-rpms.sh fedora-rawhide fc-rawhide
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294

publish-critical:
  # publish folly RPMs for critical production platforms. Manual only, think twice
  # before running this!
  when: manual
  stage: publish
  image: gitlab-registry.cern.ch/linuxsupport/cc7-base
  dependencies:
  - deps-cc7
  - deps-slc6
  - cc7
  - slc6
  tags:
  - docker_node
  script:
  - yum install -y tree sudo sssd-client createrepo
  - sudo -u stci -s tree
  - sudo -u stci -s ${PWD}/deploy-rpms.sh slc6 el-6
  - sudo -u stci -s ${PWD}/deploy-rpms.sh cc7 el-7