-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.gitlab-ci.yml
64 lines (59 loc) · 1.77 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
stages:
- build:rpm
- publish
.build_eos-exporter-template: &build_eos-exporter_definition
stage: build:rpm
script:
- ${PKG_MGR} install -y golang rpm-devel rpm-build make rpmdevtools sudo createrepo git
- make rpm
- mkdir -p ${CI_JOB_NAME}_artifacts
- cp --recursive rpmbuild/SRPMS/ ${CI_JOB_NAME}_artifacts
- cp --recursive rpmbuild/RPMS/ ${CI_JOB_NAME}_artifacts
artifacts:
paths:
- ${CI_JOB_NAME}_artifacts
expire_in: 1 week
el-7:
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
stage: build:rpm
script:
- yum-config-manager --save --setopt=epel.baseurl=https://linuxsoft.cern.ch/internal/archive/epel/7/x86_64/
- yum install -y sudo sssd-client createrepo tree
- tree
- yum install -y golang rpm-devel rpm-build make rpmdevtools sudo createrepo git
- make rpm
- mkdir -p ${CI_JOB_NAME}_artifacts
- cp --recursive rpmbuild/SRPMS/ ${CI_JOB_NAME}_artifacts
- cp --recursive rpmbuild/RPMS/ ${CI_JOB_NAME}_artifacts
artifacts:
paths:
- ${CI_JOB_NAME}_artifacts
expire_in: 1 week
el-8:
image: gitlab-registry.cern.ch/linuxsupport/alma8-base
variables:
PKG_MGR: dnf
extends: .build_eos-exporter-template
el-9:
image: gitlab-registry.cern.ch/linuxsupport/alma9-base
variables:
PKG_MGR: dnf
extends: .build_eos-exporter-template
rpm_artifacts:
stage: publish
image: gitlab-registry.cern.ch/linuxsupport/cc7-base
script:
- yum-config-manager --save --setopt=epel.baseurl=https://linuxsoft.cern.ch/internal/archive/epel/7/x86_64/
- yum install -y sudo sssd-client createrepo tree
- tree
- sudo -u stci -H ./gitlab-ci/publish_rpms.sh
needs:
- job: el-7
- job: el-8
- job: el-9
tags:
- docker_node
retry: 2
when: manual
only:
- tags