.gitlab-ci.yml 3.03 KB
Newer Older
Markus Frosch's avatar
Markus Frosch committed
1
2
3
4
5
6
7
stages:
  - build
  - test
  - upload

variables:
  DOCKER_IMAGE_BASE: registry.icinga.com/build-docker
8
  ICINGA_BUILD_TYPE: snapshot
Markus Frosch's avatar
Markus Frosch committed
9
  #ICINGA_BUILD_UPSTREAM_BRANCH:
Markus Frosch's avatar
Markus Frosch committed
10
11
12
13
14
15
16
17
18
19
20
21

.build: &build
  stage: build
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - icinga-build-package
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - ccache/
22
      - 'icinga2.git'
Markus Frosch's avatar
Markus Frosch committed
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
  artifacts:
    paths:
      - build/*
    expire_in: 1 week

.test: &test
  stage: test
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - find build/
    - icinga-build-test

.upload: &upload
  stage: upload
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/upload
  script:
    - find build/
    - icinga-build-upload-aptly
45
  only:
Markus Frosch's avatar
Markus Frosch committed
46
47
    - master
    - tags
Markus Frosch's avatar
Markus Frosch committed
48

Markus Frosch's avatar
Markus Frosch committed
49
50
51
###################################
# EPEL
###################################
Markus Frosch's avatar
Markus Frosch committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
build/rhel/8:
  <<: *build
  variables:
    DOCKER_IMAGE: rhel/8

test/rhel/8:
  <<: *test
  variables:
    DOCKER_IMAGE: rhel/8
  dependencies:
    - build/rhel/8

upload/epel/8:
  <<: *upload
  dependencies:
    - build/rhel/8

Markus Frosch's avatar
Markus Frosch committed
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
build/centos/7:
  <<: *build
  variables:
    DOCKER_IMAGE: centos/7

test/centos/7:
  <<: *test
  variables:
    DOCKER_IMAGE: centos/7
  dependencies:
    - build/centos/7

upload/epel/7:
  <<: *upload
  dependencies:
    - build/centos/7
Markus Frosch's avatar
Markus Frosch committed
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101

build/centos/6:
  <<: *build
  variables:
    DOCKER_IMAGE: centos/6

test/centos/6:
  <<: *test
  variables:
    DOCKER_IMAGE: centos/6
  dependencies:
    - build/centos/6

upload/epel/6:
  <<: *upload
  dependencies:
    - build/centos/6
Markus Frosch's avatar
Markus Frosch committed
102

Markus Frosch's avatar
Markus Frosch committed
103
104
105
###################################
# Fedora
###################################
Markus Frosch's avatar
Markus Frosch committed
106
build/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
107
108
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
109
    DOCKER_IMAGE: fedora/30
Markus Frosch's avatar
Markus Frosch committed
110

Markus Frosch's avatar
Markus Frosch committed
111
test/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
112
113
  <<: *test
  variables:
Markus Frosch's avatar
Markus Frosch committed
114
    DOCKER_IMAGE: fedora/30
Markus Frosch's avatar
Markus Frosch committed
115
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
116
    - build/fedora/30
Markus Frosch's avatar
Markus Frosch committed
117

Markus Frosch's avatar
Markus Frosch committed
118
upload/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
119
120
  <<: *upload
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
121
    - build/fedora/30
Markus Frosch's avatar
Markus Frosch committed
122

Markus Frosch's avatar
Markus Frosch committed
123
build/fedora/29:
Markus Frosch's avatar
Markus Frosch committed
124
125
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
126
    DOCKER_IMAGE: fedora/29
Markus Frosch's avatar
Markus Frosch committed
127

Markus Frosch's avatar
Markus Frosch committed
128
test/fedora/29:
Markus Frosch's avatar
Markus Frosch committed
129
130
  <<: *test
  variables:
Markus Frosch's avatar
Markus Frosch committed
131
    DOCKER_IMAGE: fedora/29
Markus Frosch's avatar
Markus Frosch committed
132
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
133
    - build/fedora/29
Markus Frosch's avatar
Markus Frosch committed
134

Markus Frosch's avatar
Markus Frosch committed
135
upload/fedora/29:
Markus Frosch's avatar
Markus Frosch committed
136
137
  <<: *upload
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
138
    - build/fedora/29
Markus Frosch's avatar
Markus Frosch committed
139

Markus Frosch's avatar
Markus Frosch committed
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
###################################
# SLES
###################################
build/sles/15.0:
  <<: *build
  variables:
    DOCKER_IMAGE: sles/15.0

test/sles/15.0:
  <<: *test
  variables:
    DOCKER_IMAGE: sles/15.0
  dependencies:
    - build/sles/15.0

upload/SUSE/15.0:
  <<: *upload
  dependencies:
    - build/sles/15.0

build/sles/12.4:
  <<: *build
  variables:
    DOCKER_IMAGE: sles/12.4

test/sles/12.4:
  <<: *test
  variables:
    DOCKER_IMAGE: sles/12.4
  dependencies:
    - build/sles/12.4

upload/SUSE/12.4:
  <<: *upload
  dependencies:
    - build/sles/12.4

###################################
# openSUSE
###################################
build/opensuse/15.0:
  <<: *build
  variables:
    DOCKER_IMAGE: opensuse/15.0

test/opensuse/15.0:
  <<: *test
  variables:
    DOCKER_IMAGE: opensuse/15.0
  dependencies:
    - build/opensuse/15.0

upload/openSUSE/15.0:
  <<: *upload
  dependencies:
    - build/opensuse/15.0