-
Notifications
You must be signed in to change notification settings - Fork 13
/
.gitlab-ci.yml
131 lines (114 loc) · 2.95 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
stages:
- build
- test
- publish
#--------------------------
# Build templates
#--------------------------
.build-template: &build-template_definition
stage: build
script:
- ci/fedora-packages.sh
- ci/common-rpm-build.sh
- mkdir ${CI_JOB_NAME}
- cp -rv build/RPMS build/SRPMS ${CI_JOB_NAME}
- tree ${CI_JOB_NAME}
variables:
BRANCH: ${CI_COMMIT_REF_NAME}
artifacts:
paths:
- "$CI_JOB_NAME"
#--------------------------
# Build jobs
#--------------------------
alma8:
image: gitlab-registry.cern.ch/linuxsupport/alma8-base
<<: *build-template_definition
alma9:
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
<<: *build-template_definition
fedora-39:
image: fedora:39
<<: *build-template_definition
fedora-40:
image: fedora:40
<<: *build-template_definition
fedora-rawhide:
image: fedora:rawhide
<<: *build-template_definition
allow_failure: true
#--------------------------
# Test templates
#--------------------------
.test-template: &test-template_definition
stage: test
script:
- dnf install -y git
- PLATFORM=${CI_JOB_NAME%-*}
- ci/write-repo-file.sh
- dnf install -y ${PLATFORM}/RPMS/*/*.rpm
- gfal2-unit-tests
variables:
BRANCH: ${CI_COMMIT_REF_NAME}
#--------------------------
# Test jobs
#--------------------------
alma8-test:
image: gitlab-registry.cern.ch/linuxsupport/alma8-base
needs:
- job: alma8
before_script:
- dnf install -y epel-release
<<: *test-template_definition
alma9-test:
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
needs:
- job: alma9
before_script:
- dnf install -y epel-release
<<: *test-template_definition
fedora-39-test:
image: fedora:39
needs:
- job: fedora-39
<<: *test-template_definition
fedora-40-test:
image: fedora:40
needs:
- job: fedora-40
<<: *test-template_definition
#--------------------------
# Publish jobs
#--------------------------
rpms:
stage: publish
image: gitlab-registry.cern.ch/eos/gitlab-eos/alma9:latest
dependencies:
- alma8
- alma9
- fedora-39
- fedora-40
- fedora-rawhide
script:
- automount
- cat "${repo_passwd}" | kinit "${repo_user}"
- |
for platform in alma8 alma9 fedora-39 fedora-40 fedora-rawhide; do
if [[ "${platform}" == "fedora-rawhide" ]] && [[ ! -d ${platform} ]] ; then
echo "Skipping ${platform} packages..." ;
continue ;
fi
packaging/gfal2-repo-manager.py --action add --base /eos/project-d/dmc/www/repos/ --ref ${CI_COMMIT_REF_NAME} --packages ${platform}/RPMS/*/*.rpm ${platform}/SRPMS/*
done
- sleep 30
rules:
- if: '$CI_PROJECT_NAMESPACE != "dmc"'
when: never
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: never
- if: '$CI_COMMIT_REF_NAME == "develop" || $CI_COMMIT_TAG != null'
- if: '$CI_COMMIT_REF_NAME != "develop" && $CI_COMMIT_TAG == null'
when: manual
tags:
- docker-privileged-xl
retry: 2