forked from cern-fts/davix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
203 lines (188 loc) · 4.76 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
stages:
- build
- test
- publish
cmake-no-git:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- ci/fedora/packages.sh
- yum install -y git rpm-build gcc-c++
- git submodule update --init --recursive
- ./packaging/make-srpm.sh
- yum-builddep -y build/SRPMS/*
- rm -rf .git build
- mkdir build
- cd build
- cmake3 ..
cmake-tarball:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- ci/fedora/packages.sh
- yum install -y git rpm-build gcc-c++
- git submodule update --init --recursive
- ./packaging/make-srpm.sh
- yum-builddep -y build/SRPMS/*
- packaging/make-dist.sh
- cd build
- tar xf davix-*.tar.gz
- cd davix-*/
- mkdir build && cd build
- cmake3 ..
cc7:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- ci/fedora/packages.sh
- yum install -y git rpm-build
- ci/common-rpm-build.sh
- mkdir ${CI_JOB_NAME}
- cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
slc6:
stage: build
image: gitlab-registry.cern.ch/linuxsupport/slc6-base
script:
- ci/fedora/packages.sh
- yum install -y python-argparse tar
- ci/common-rpm-build.sh
- mkdir ${CI_JOB_NAME}
- cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
fedora-31:
stage: build
image: fedora:31
script:
- ci/fedora/packages.sh
- ci/common-rpm-build.sh
- mkdir ${CI_JOB_NAME}
- cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
fedora-30:
stage: build
image: fedora:30
script:
- ci/fedora/packages.sh
- ci/common-rpm-build.sh
- mkdir ${CI_JOB_NAME}
- cp -r /root/rpmbuild/RPMS build/SRPMS ${CI_JOB_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
ubuntu-disco:
stage: build
image: ubuntu:disco
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}
artifacts:
paths:
- "$CI_JOB_NAME"
debian-jessie:
stage: build
image: debian:jessie
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:31
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
cc7-test:
stage: test
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
dependencies:
- cc7
script:
- yum install -y cc7/RPMS/*.rpm
- davix-unit-tests
slc6-test:
stage: test
image: gitlab-registry.cern.ch/linuxsupport/slc6-base
dependencies:
- slc6
script:
- yum install -y slc6/RPMS/*.rpm
- davix-unit-tests
fedora-31-test:
stage: test
image: fedora:31
dependencies:
- fedora-31
script:
- dnf install -y fedora-31/RPMS/*.rpm
- davix-unit-tests
fedora-30-test:
stage: test
image: fedora:30
dependencies:
- fedora-30
script:
- dnf install -y fedora-30/RPMS/*.rpm
- davix-unit-tests
docs:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/cc7:latest
dependencies:
- docs-generate
script:
- yum install -y sssd-client sudo
- automount
- cat "$DAVIXCI_PW" | kinit davixci
- eosfusebind
- 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"
- sleep 60
tags:
- docker-privileged
retry: 2
only:
- branches@dmc/davix
- tags@dmc/davix
rpms:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/cc7:latest
dependencies:
- cc7
- slc6
script:
- yum install -y python sssd-client sudo createrepo
- automount
- cat "$STCI_PASSWORD" | kinit stci
- eosfusebind
- for platform in cc7 slc6; 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
- cp cc7/RPMS/* cc7/SRPMS/* /eos/project-d/dmc/www/repos/testing/el7/x86_64
- packaging/update-repo.sh /eos/project-d/dmc/www/repos/testing/el7/x86_64
- cp slc6/RPMS/* slc6/SRPMS/* /eos/project-d/dmc/www/repos/testing/el6/x86_64
- packaging/update-repo.sh /eos/project-d/dmc/www/repos/testing/el6/x86_64
- sleep 60
tags:
- docker-privileged
retry: 2
only:
- branches@dmc/davix
- tags@dmc/davix