forked from cern-eos/eos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
776 lines (693 loc) · 28.6 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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
stages:
- build:rpm
- build:dockerimage
- test
- publish
- clean
before_script:
- source gitlab-ci/export_branch.sh
- echo "Exporting BRANCH=${BRANCH}"
.system_test_template: &system_test_template_definition
script:
- sudo ./eos-docker/scripts/shutdown_services.sh
- ./eos-docker/scripts/remove_unused_images.sh
- docker pull gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID}
- if [ "$CI_JOB_NAME" == "system_test_with_quarkdb" ]; then sudo ./eos-docker/scripts/start_services.sh -q -i gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID}; else sudo ./eos-docker/scripts/start_services.sh -i gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID}; fi
- docker exec -i eos-mgm-test /bin/bash -c 'eos chmod 2777 /eos/dockertest; eos vid enable krb5;'
- docker exec -i eos-mgm-test eos-instance-test-ci
- docker exec -i eos-client-test git clone https://gitlab.cern.ch/dss/eosclient-tests.git
- docker exec -di eos-client-test /bin/bash -c 'mkdir /eos1/; mount -t fuse eosxd /eos1/'
- docker exec -di eos-client-test /bin/bash -c 'mkdir /eos2/; mount -t fuse eosxd /eos2/'
- docker exec -i -u eos-user eos-client-test /bin/bash -c 'cd /eos1/dockertest/; fusex-benchmark'
- if [ "$CI_PIPELINE_SOURCE" == "schedule" ]; then docker exec -i eos-mgm-test eos vid add gateway eos-client-test.eoscluster.cern.ch unix; docker exec -i eos-client-test env EOS_FUSE_NO_ROOT_SQUASH=1 python /eosclient-tests/run.py --workdir="/eos1/dockertest /eos2/dockertest" all; else docker exec -i -u eos-user eos-client-test python /eosclient-tests/run.py --workdir="/eos1/dockertest /eos2/dockertest" ci; fi
- docker exec -i eos-client-test env EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch eos fuse mount /eos_fuse
- docker exec -i eos-client-test env EOS_MGM_URL=root://eos-mgm-test.eoscluster.cern.ch eos fuse mount /eos_fuse2
- docker exec -i eos-client-test python /eosclient-tests/run.py --workdir="/eos_fuse/dockertest /eos_fuse2/dockertest" ci
- sudo ./eos-docker/scripts/shutdown_services.sh
.ubuntu_system_test_template: &ubuntu_system_test_template_definition
script:
- sudo ./eos-docker/scripts/shutdown_services.sh
- ./eos-docker/scripts/remove_unused_images.sh
- docker pull gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID}
- docker pull gitlab-registry.cern.ch/dss/eos:ubuntu_client_${CI_COMMIT_TAG-$CI_PIPELINE_ID}
# Run the following tests only on the NS in QuarkDB
- sudo ./eos-docker/scripts/start_services.sh -q -i gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID} -u gitlab-registry.cern.ch/dss/eos:ubuntu_client_${CI_COMMIT_TAG-$CI_PIPELINE_ID};
- docker exec -i eos-mgm-test /bin/bash -c 'eos chmod 2777 /eos/dockertest; eos vid enable krb5'
- docker exec -i eos-mgm-test eos-instance-test-ci
- docker exec -i eos-client-test git clone https://gitlab.cern.ch/dss/eosclient-tests.git
- docker exec -di eos-client-test /bin/bash -c 'mkdir /eos1/; mount -t fuse eosxd /eos1/'
- docker exec -di eos-client-test /bin/bash -c 'mkdir /eos2/; mount -t fuse eosxd /eos2/'
- docker exec -i -u eos-user eos-client-test /bin/bash -c 'cd /eos1/dockertest/; fusex-benchmark'
- if [ "$CI_PIPELINE_SOURCE" == "schedule" ]; then docker exec -i eos-mgm-test eos vid add gateway eos-client-test.eoscluster.cern.ch unix; docker exec -i eos-client-test env EOS_FUSE_NO_ROOT_SQUASH=1 python /eosclient-tests/run.py --workdir="/eos1/dockertest /eos2/dockertest" all; else docker exec -i -u eos-user eos-client-test python /eosclient-tests/run.py --workdir="/eos1/dockertest /eos2/dockertest" ci; fi
- sudo ./eos-docker/scripts/shutdown_services.sh
.fedora_template: &fedora_template_definition
stage: build:rpm
script:
- dnf install --nogpg -y gcc-c++ cmake3 make rpm-build which git tar dnf-plugins-core ccache rpm-sign
- git submodule update --init --recursive
- mkdir build; cd build
- cmake3 .. -DPACKAGEONLY=1; make srpm; cd ..
- echo -e '[eos-depend]\nname=EOS dependencies\nbaseurl=http://storage-ci.web.cern.ch/storage-ci/eos/'${BRANCH}'-depend/'${EOS_ARCH}'/x86_64/\ngpgcheck=0\nenabled=1\nexclude=xrootd*\npriority=4\n' >> /etc/yum.repos.d/eos-depend.repo
- dnf builddep --nogpgcheck -y build/SRPMS/*
- if [[ $CI_COMMIT_TAG ]]; then BUILD_TYPE=tag; else BUILD_TYPE=commit; fi
- if [ "$BUILD_TYPE" == "commit" ]; then source gitlab-ci/setup_ccache_fc.sh; else export CCACHE_DISABLE=1; fi
# @todo: add this flag to have the build pass as it fails during boost header compilation - should be removed in the future ...
- export CXXFLAGS="-Wno-parentheses"
- rpmbuild --rebuild --with server --define "_rpmdir build/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" build/SRPMS/*
- ccache -s
- if [ "$BUILD_TYPE" == "tag" ]; then gpg2 --allow-secret-key-import --import /keys/stci-debian-repo.sec; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- mkdir ${EOS_ARCH}_artifacts
- cp -R build/SRPMS ${EOS_ARCH}_artifacts
- cp -R build/RPMS ${EOS_ARCH}_artifacts
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- ccache/
artifacts:
expire_in: 1 day
paths:
- ${EOS_ARCH}_artifacts/
allow_failure: true
.ubuntu_template: &ubuntu_template_definition
stage: build:rpm
script:
- apt-get update -y; apt-get install -y git cmake g++ debhelper devscripts equivs gdebi-core ccache
- echo -e '\ndeb http://storage-ci.web.cern.ch/storage-ci/debian/xrootd/ '${EOS_ARCH}' master' >> /etc/apt/sources.list
- echo -e '\ndeb http://storage-ci.web.cern.ch/storage-ci/debian/xrootd/ '${EOS_ARCH}' release' >> /etc/apt/sources.list
- curl -sL http://storage-ci.web.cern.ch/storage-ci/storageci.key | apt-key add -
- apt-get update -y
- git submodule update --init --recursive
- mk-build-deps --build-dep debian/control
- gdebi -n eos-build-deps-depends*.deb
- dch --create -v `./genversion.sh` --package eos --urgency low --distribution ${EOS_ARCH} -M "This package is built and released automatically. For important notices and releases subscribe to our mailing lists or visit our website."
- if [[ $CI_COMMIT_TAG ]]; then export CCACHE_DISABLE=1; else source gitlab-ci/setup_ccache_deb.sh; fi
- dpkg-buildpackage -b -us -uc -tc --buildinfo-option="-udeb_packages" --changes-option="-udeb_packages"
- ccache -s
- mkdir ${EOS_ARCH}
- cp deb_packages/*.deb ${EOS_ARCH}
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- ccache/
allow_failure: true
clone_docker:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y git
- git clone https://gitlab.cern.ch/eos/eos-docker.git
artifacts:
expire_in: 1 day
paths:
- eos-docker/
tags:
- docker-fc_rawhide
build_slc6:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/slc6-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git yum-plugin-priorities tar ccache sl-release-scl
- git submodule update --init --recursive
- mkdir build
- cd build
- cmake3 .. -DPACKAGEONLY=1
- make srpm
- cd ..
- echo -e '[eos-depend]\nname=EOS dependencies\nbaseurl=http://storage-ci.web.cern.ch/storage-ci/eos/'${BRANCH}'-depend/el-6/x86_64/\ngpgcheck=0\nenabled=1\nexclude=xrootd*\npriority=4\n' >> /etc/yum.repos.d/eos-depend.repo
# @todo: this should be dropped in the future when we drop kinetic support
- echo -e '\n[kio]\nname=kio\nbaseurl=https://storage-ci.web.cern.ch/storage-ci/kinetic/kineticio/el-6-x86_64\nenabled=1\n' >> /etc/yum.repos.d/eos-depend.repo
- yum-builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y build/SRPMS/*
- if [[ $CI_COMMIT_TAG ]]; then BUILD_TYPE=tag; else BUILD_TYPE=commit; fi
- if [ "$BUILD_TYPE" == "commit" ]; then source gitlab-ci/setup_ccache_slc6.sh; ccache --max-size=1.5G; else export CCACHE_DISABLE=1; fi
- rpmbuild --rebuild --with server --define "_rpmdir build/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" build/SRPMS/*
- ccache -s
- if [ "$BUILD_TYPE" == "tag" ]; then gpg --allow-secret-key-import --import /keys/stci-debian-repo.sec; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- mkdir slc6_artifacts
- cp -R build/SRPMS slc6_artifacts
- cp -R build/RPMS slc6_artifacts
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- ccache/
artifacts:
expire_in: 1 day
paths:
- slc6_artifacts/
tags:
- docker-slc6
build_cc7:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git yum-plugin-priorities ccache epel-release rpm-sign
- git submodule update --init --recursive
- mkdir build
- cd build
- cmake3 .. -DPACKAGEONLY=1
- make srpm
- cd ..
- echo -e '[eos-depend]\nname=EOS dependencies\nbaseurl=http://storage-ci.web.cern.ch/storage-ci/eos/'${BRANCH}'-depend/el-7/x86_64/\ngpgcheck=0\nenabled=1\nexclude=xrootd*\npriority=4\n' >> /etc/yum.repos.d/eos-depend.repo
# @todo: this should be dropped in the future when we drop kinetic support
- echo -e '\n[kio]\nname=kio\nbaseurl=https://storage-ci.web.cern.ch/storage-ci/kinetic/kineticio/el-7-x86_64\nenabled=1\n' >> /etc/yum.repos.d/eos-depend.repo
- yum-builddep --nogpgcheck --setopt="cern*.exclude=xrootd*" -y build/SRPMS/*
- if [[ $CI_COMMIT_TAG ]]; then BUILD_TYPE=tag; else BUILD_TYPE=commit; fi
- if [ "$BUILD_TYPE" == "commit" ]; then source gitlab-ci/setup_ccache.sh; else export CCACHE_DISABLE=1; fi
- rpmbuild --rebuild --with=server --define "_rpmdir build/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" build/SRPMS/*
- ccache -s
- if [ "$BUILD_TYPE" == "tag" ]; then gpg --allow-secret-key-import --import /keys/stci-debian-repo.sec; printf "" | setsid rpmsign --define='%_gpg_name [email protected]' --define='%_signature gpg' --addsign build/RPMS/*.rpm; fi
- mkdir cc7_artifacts
- cp -R build/SRPMS cc7_artifacts
- cp -R build/RPMS cc7_artifacts
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME"
paths:
- ccache/
artifacts:
expire_in: 1 day
paths:
- cc7_artifacts/
tags:
- docker-cc7
build_fedora28:
image: fedora:28
<<: *fedora_template_definition
variables:
EOS_ARCH: fc-28
tags:
- docker-fc28
build_fedora_rawhide:
image: registry.fedoraproject.org/fedora:rawhide
<<: *fedora_template_definition
variables:
EOS_ARCH: fc-rawhide
artifacts:
expire_in: 1 day
paths:
- fc-rawhide_artifacts/
tags:
- docker-fc_rawhide
build_ubuntu_artful:
image: ubuntu:artful
<<: *ubuntu_template_definition
variables:
EOS_ARCH: artful
artifacts:
expire_in: 1 day
paths:
- artful/
tags:
- docker-ubuntu
build_ubuntu_bionic:
image: ubuntu:bionic
<<: *ubuntu_template_definition
variables:
EOS_ARCH: bionic
artifacts:
expire_in: 1 day
paths:
- bionic/
tags:
- docker-ubuntu
macosx_dmg:
stage: build:rpm
script:
- git submodule update --init --recursive
- mkdir build
- mkdir install
- cd build
- cmake -DCLIENT=1 -DCMAKE_INSTALL_PREFIX=/usr/local -D Z_ROOT_DIR=/usr/local/opt/zlib/ -D OPENSSL_ROOT_DIR=/usr/local/opt/openssl/ -D NCURSES_ROOT_DIR=/usr/local/opt/ncurses/ -D ZMQ_ROOT_DIR=/usr/local/opt/zeromq/ -D XROOTD_ROOT_DIR=/usr/local/opt/xrootd/ -D UUID_ROOT_DIR=/usr/local/opt/ossp-uuid ..
- make -j 4
- make install DESTDIR=../install/
- version=`../genversion.sh`
- ../utils/eos-osx-package.sh $version ../install/
- ccache -s
- cd ..
- mkdir osx_artifacts
- cp build/*.dmg osx_artifacts
artifacts:
expire_in: 1 day
paths:
- osx_artifacts/
tags:
- macosx-shell
allow_failure: true
cc7_docker_image_commit:
stage: build:dockerimage
tags:
- docker-image-build
script:
- ""
variables:
TO: gitlab-registry.cern.ch/dss/eos:${CI_PIPELINE_ID}
DOCKER_FILE: eos-docker/Dockerfile
dependencies:
- build_cc7
- clone_docker
only:
- branches
except:
- beryl_aquamarine
- tags
ubuntu_docker_image_commit:
stage: build:dockerimage
tags:
- docker-image-build
script:
- ""
variables:
TO: gitlab-registry.cern.ch/dss/eos:ubuntu_client_${CI_PIPELINE_ID}
DOCKER_FILE: eos-docker/ubuntu_client/Dockerfile
NO_CACHE: 1
only:
- dev
- master
allow_failure: true
cc7_docker_image_tag:
stage: build:dockerimage
tags:
- docker-image-build
script:
- ""
variables:
TO: gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG}
DOCKER_FILE: eos-docker/Dockerfile
NO_CACHE: 1
dependencies:
- build_cc7
- clone_docker
only:
- tags
ubuntu_docker_image_tag:
stage: build:dockerimage
tags:
- docker-image-build
script:
- ""
variables:
TO: gitlab-registry.cern.ch/dss/eos:ubuntu_client_${CI_COMMIT_TAG}
DOCKER_FILE: eos-docker/ubuntu_client/Dockerfile
NO_CACHE: 1
only:
- tags
allow_failure: true
prod_docker_image_tag:
stage: build:dockerimage
tags:
- docker-image-build
script:
- ""
variables:
TO: gitlab-registry.cern.ch/dss/eos/eos-prod:${CI_COMMIT_TAG}
DOCKER_FILE: eos-docker/projects/eos/Dockerfile
NO_CACHE: 1
dependencies:
- build_cc7
- clone_docker
allow_failure: true
only:
- tags
unit_test:
stage: test
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git yum-plugin-priorities ccache epel-release cppunit-devel centos-release-scl
- yum install --nogpg -y devtoolset-6 devtoolset-6-libasan-devel
- git submodule update --init --recursive
- mkdir build
- cd build
- cmake3 .. -DPACKAGEONLY=1
- make srpm
- cd ..
- source gitlab-ci/export_buildtype.sh 24 build/SRPMS
- if [ "$BUILD_TYPE" == "commit" ]; then source gitlab-ci/setup_ccache.sh; else export CCACHE_DISABLE=1; fi
- echo -e '[eos-depend]\nname=EOS dependencies\nbaseurl=http://storage-ci.web.cern.ch/storage-ci/eos/'${BRANCH}'-depend/el-7/x86_64/\ngpgcheck=0\nenabled=1\nexclude=xrootd*\npriority=4\n' >> /etc/yum.repos.d/eos-depend.repo
# @todo: this should be dropped in the future when we drop kinetic support
- echo -e '\n[kio]\nname=kio\nbaseurl=https://storage-ci.web.cern.ch/storage-ci/kinetic/kineticio/el-7-x86_64\nenabled=1\n' >> /etc/yum.repos.d/eos-depend.repo
- yum-builddep --nogpgcheck -y --setopt="cern*.exclude=xrootd*" build/SRPMS/*
- rm -rf build
- mkdir build
- cd build
- scl enable devtoolset-6 "CXXFLAGS='-fsanitize=address' cmake3 .. -DBUILD_TESTS=1"
- make eos-unit-tests eos-fst-unit-tests -j 4
- ccache -s
- ./unit_tests/eos-unit-tests || true
- ./unit_tests/eos-fst-unit-tests || true
cache:
key: "$CI_BUILD_NAME-$CI_BUILD_REF_NAME"
paths:
- ccache/
dependencies: []
tags:
- docker-cc7
system_test:
stage: test
<<: *system_test_template_definition
tags:
- shell-with-docker
allow_failure: true
dependencies:
- clone_docker
retry: 1
ubuntu_system_test:
stage: test
<<: *ubuntu_system_test_template_definition
tags:
- ubuntu
- shell-with-docker
allow_failure: true
dependencies:
- clone_docker
retry: 1
system_test_with_quarkdb:
stage: test
<<: *system_test_template_definition
tags:
- xrootd-shell
allow_failure: true
dependencies:
- clone_docker
retry: 1
stress_test:
stage: test
script:
- sudo ./eos-docker/scripts/shutdown_services.sh
- ./eos-docker/scripts/remove_unused_images.sh
- docker pull gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID}
- sudo ./eos-docker/scripts/start_services.sh -i gitlab-registry.cern.ch/dss/eos:${CI_COMMIT_TAG-$CI_PIPELINE_ID}
- docker exec -i eos-mgm-test eos chmod 2777 /eos/dockertest
- docker exec -i eos-mgm-test hammer-runner.py --strict-exit-code 1 --gitlab --url eos-mgm-test.eoscluster.cern.ch//eos/dockertest/hammer/ --protocols xroot --threads 1 2 10 100 --operations write stat read delete --runs 3 --nfiles 10000
- sudo ./eos-docker/scripts/shutdown_services.sh
tags:
- eos-stress
dependencies:
- clone_docker
allow_failure: true
retry: 1
publish_koji_cc7:
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y sssd-client
- yum install -y koji --disablerepo=extras
- mkdir ~/.koji
- echo -e '[koji]\nserver = https://kojihub.cern.ch/kojihub\nweburl = https://koji.cern.ch/\ntopurl = https://koji.cern.ch/kojifiles\nkrb_canon_host = no\nkrb_rdns = False\n' >> ~/.koji/config
- kinit [email protected] -k -t /stci.krb5/stci.keytab
- koji build eos7 cc7_artifacts/SRPMS/*.src.rpm
tags:
- docker-cc7
dependencies:
- build_cc7
only:
- tags
publish_koji_slc6:
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y sssd-client
- yum install -y koji --disablerepo=extras
- mkdir ~/.koji
- echo -e '[koji]\nserver = https://kojihub.cern.ch/kojihub\nweburl = https://koji.cern.ch/\ntopurl = https://koji.cern.ch/kojifiles\nkrb_canon_host = no\nkrb_rdns = False\n' >> ~/.koji/config
- kinit [email protected] -k -t /stci.krb5/stci.keytab
- koji build eos6 slc6_artifacts/SRPMS/*.src.rpm
tags:
- docker-slc6
dependencies:
- build_slc6
only:
- tags
rpm_testing_artifacts:
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y sudo sssd-client createrepo
- if [[ $CI_COMMIT_TAG ]]; then BUILD_TYPE="tag/testing"; else BUILD_TYPE="commit"; fi
- sudo -u stci -H ./gitlab-ci/store_artifacts.sh ${BRANCH} ${BUILD_TYPE} /eos/project/s/storage-ci/www/eos
tags:
- docker-cc7
only:
- master
- dev
- tags
retry: 2
rpm_stable_artifacts:
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y sudo sssd-client createrepo
- if [[ $CI_COMMIT_TAG ]]; then BUILD_TYPE="tag"; else echo "This only works for tags"; exit 0; fi
- ./gitlab-ci/store_artifacts.sh ${BRANCH} ${BUILD_TYPE} /mnt/eos_repositories/eos
- sudo -u stci -H ./gitlab-ci/store_artifacts.sh ${BRANCH} ${BUILD_TYPE} /eos/project/s/storage-ci/www/eos
- echo ${CI_COMMIT_TAG} | sudo -u stci tee /eos/project/s/storage-ci/www/eos/${BRANCH}/tag/latest_version
tags:
- docker-cc7
when: manual
environment:
name: production
debian_artifacts:
stage: publish
image: ubuntu:artful
script:
- apt-get update
- apt-get install -y sudo apt-utils sssd
- mkdir /home/stci
- chown -R stci:def-cg /home/stci
- chmod -R 700 /home/stci
- sudo -u stci -H gpg --homedir /home/stci/ --allow-secret-key-import --import /keys/stci-debian-repo.sec
- if [[ $CI_COMMIT_TAG ]]; then BUILD_TYPE=tag; else BUILD_TYPE=commit; fi
- sudo -u stci -H ./gitlab-ci/store_artifacts_debian.sh /eos/project/s/storage-ci/www/debian/eos/${BRANCH} ${BUILD_TYPE}
tags:
- docker-ubuntu
dependencies:
- build_ubuntu_artful
- build_ubuntu_bionic
allow_failure: true
retry: 2
only:
- master
- dev
- tags
debian_artifacts_volume:
stage: publish
image: ubuntu:artful
script:
- apt-get update
- apt-get install -y sudo apt-utils sssd
- mkdir /home/stci
- gpg --homedir /home/stci/ --allow-secret-key-import --import /keys/stci-debian-repo.sec
- ./gitlab-ci/store_artifacts_debian.sh /mnt/eos_repositories/debian/eos/${BRANCH} tag
tags:
- docker-cc7
dependencies:
- build_ubuntu_artful
- build_ubuntu_bionic
only:
- tags
clean_rpm_artifacts:
stage: clean
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y sssd-client sudo createrepo
- sudo -u stci -H ./gitlab-ci/remove_old_artifacts.sh
tags:
- docker-cc7
allow_failure: true
only:
- triggers
- schedules
clean_debian_artifacts:
stage: clean
image: ubuntu:artful
script:
- apt-get update
- apt-get install -y sudo apt-utils sssd
- mkdir /home/stci
- chown -R stci:def-cg /home/stci
- chmod -R 700 /home/stci
- sudo -u stci -H gpg --homedir /home/stci/ --allow-secret-key-import --import /keys/stci-debian-repo.sec
- sudo -u stci -H ./gitlab-ci/remove_old_artifacts_debian.sh
tags:
- docker-ubuntu
allow_failure: true
only:
- schedules
periodic_coverity:
stage: build:rpm
script:
- rm -f CMakeCache.txt
- git submodule update --init --recursive; mkdir build; cd build; scl enable "cmake3 .. -DPACKAGEONLY=1"; make srpm
- sudo yum-builddep --nogpgcheck -y --setopt="cern*.exclude=xrootd*" --setopt="eos-depend.exclude=protobuf3*" SRPMS/*
- rm -rf ./*; scl enable devtoolset-6 "cmake3 .."
- cov-build --dir cov-int make -j 4
- tar czvf eos-metrics.tgz cov-int
- curl --form token="`cat /home/gitlab-runner/.coverity_token`" --form [email protected] --form [email protected] --form version="`../genversion.sh`" --form description="Periodic Gitlab build" https://scan.coverity.com/builds?project=cern-eos%2Feos
tags:
- coverity
allow_failure: true
when: manual
cppcheck_sonar:
stage: build:rpm
script:
- rm -f CMakeCache.txt
- git submodule update --init --recursive; mkdir build; cd build; scl enable "cmake3 .. -DPACKAGEONLY=1"; make srpm; cd ..;
- sudo yum-builddep --nogpgcheck -y --setopt="cern*.exclude=xrootd*" --setopt="eos-depend.exclude=protobuf3*" build/SRPMS/*
- cppcheck -j 4 -v --enable=all --inline-suppr --xml --xml-version=2 -i common/fmt -i fst/layout/gf-complete -i fst/layout/jerasure -i common/sqlite -i namespace/ns_quarkdb/qclient common/ fst/ mgm/ console/ fuse/ fusex/ namespace/ mq/ 2> cppcheck-report.xml
- sonar-scanner -Dsonar.cxx.cppcheck.reportPath=cppcheck-report.xml -Dsonar.projectVersion="`./genversion.sh`" -Dsonar.sources=common/,fst/,mgm/,console/,fuse/,namespace/,mq/
tags:
- coverity
allow_failure: true
when: manual
#-------------------------------------------------------------------------------
# Manually triggered builds
#-------------------------------------------------------------------------------
eos_nginx_slc6:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/slc6-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git tar sudo createrepo
- cd nginx
- ./makesrpm.sh
- yum-builddep --nogpgcheck -y *.src.rpm
- mkdir RPMS
- rpmbuild --rebuild --define "_rpmdir RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" *.src.rpm
- groupadd --gid 2766 def-cg
- useradd -u 102230 -g def-cg stci
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-6/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker-slc6
when: manual
environment:
name: nginx-slc6-prod
eos_nginx_cc7:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git sssd-client sudo createrepo
- cd nginx
- ./makesrpm.sh
- yum-builddep --nogpgcheck -y *.src.rpm
- mkdir RPMS
- rpmbuild --rebuild --define "_rpmdir RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" *.src.rpm
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-7/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker-cc7
when: manual
environment:
name: nginx-cc7-prod
eos_apmon_slc6:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/slc6-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git tar sudo createrepo
- cd ApMon
- ./maketar.sh
- mkdir -p rpmbuild/{BUILD,BUILDROT,RPMS,SOURCES,SPECS,SRPMS}
- cp eos-apmon-*.tar.gz rpmbuild/SOURCES
- rpmbuild --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" --define "_topdir ./rpmbuild" -bs eos-apmon.spec
- yum-builddep --nogpgcheck -y rpmbuild/SRPMS/eos-apmon-*.src.rpm
- rpmbuild --rebuild --define "_rpmdir rpmbuild/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" rpmbuild/SRPMS/eos-apmon-*.src.rpm
- groupadd --gid 2766 def-cg
- useradd -u 102230 -g def-cg stci
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-6/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f rpmbuild/RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-6/SRPM
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f rpmbuild/SRPMS/*.src.rpm $STORAGE_PATH
tags:
- docker-slc6
when: manual
environment:
name: apmon-slc6-prod
eos_apmon_cc7:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y gcc-c++ cmake3 make rpm-build which git sssd-client sudo createrepo
- cd ApMon
- ./maketar.sh
- rpmbuild --define "_source_filedigest_algorithm md5" --define "_binary_filedigest_algorithm md5" --define "_topdir ./rpmbuild" -ts eos-apmon-*.tar.gz
- yum-builddep --nogpgcheck -y rpmbuild/SRPMS/eos-apmon-*.src.rpm
- rpmbuild --rebuild --define "_rpmdir rpmbuild/RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" rpmbuild/SRPMS/eos-apmon-*.src.rpm
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-7/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f rpmbuild/RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker-cc7
when: manual
environment:
name: apmon-cc7-prod
eos_microhttpd_slc6:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/slc6-base
script:
- yum install --nogpg -y gcc-c++ make rpm-build which git tar sudo createrepo
- cd microhttpd
- ./makesrpm.sh
- yum-builddep --nogpgcheck -y *.src.rpm
- rpmbuild --rebuild --define "_rpmdir RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" *.src.rpm
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-6/x86_64
- groupadd --gid 2766 def-cg
- useradd -u 102230 -g def-cg stci
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker-fc_rawhide
when: manual
eos_microhttpd_cc7:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y gcc-c++ make rpm-build which git sssd-client sudo createrepo
- cd microhttpd
- ./makesrpm.sh
- yum-builddep --nogpgcheck -y *.src.rpm
- mkdir RPMS
- rpmbuild --rebuild --define "_rpmdir RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" *.src.rpm
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}-depend/el-7/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker-cc7
when: manual
eos_docs:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y make python-sphinx sssd-client sudo which git
- cd doc
- export PYTHONPATH=`pwd`/_themes/
- make html
- sudo -u stci -H bash -c "rm -rf /eos/project/e/eos/www/docs/*"
- sudo -u stci -H cp -R _build/html/* /eos/project/e/eos/www/docs/
tags:
- docker-cc7
when: manual
eos_repopackage:
stage: build:rpm
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum install --nogpg -y rpm-build sssd-client sudo createrepo
- mkdir build
- cd build
- rpmbuild --bb --define "_rpmdir RPMS/" --define "_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm" ../elrepopackage.spec
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}/tag/el-7/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
- STORAGE_PATH=/eos/project/s/storage-ci/www/eos/${BRANCH}/tag/el-6/x86_64
- sudo -u stci -H mkdir -p $STORAGE_PATH
- sudo -u stci -H cp -f RPMS/*.rpm $STORAGE_PATH
- sudo -u stci -H createrepo --update -q $STORAGE_PATH
tags:
- docker-cc7
when: manual