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

variables:
  DOCKER_IMAGE_BASE: registry.icinga.com/build-docker
  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
Markus Frosch's avatar
Markus Frosch committed
45
  # TODO: enable when switching to GitLab CI
46
47
  only:
    - nonexisting_branch
Markus Frosch's avatar
Markus Frosch committed
48
49
  #  - tags
  #  - master
Markus Frosch's avatar
Markus Frosch committed
50

Markus Frosch's avatar
Markus Frosch committed
51
52
53
###################################
# EPEL
###################################
Markus Frosch's avatar
Markus Frosch committed
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86

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
87

Markus Frosch's avatar
Markus Frosch committed
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
###################################
# Fedora
###################################
build/fedora/29:
  <<: *build
  variables:
    DOCKER_IMAGE: fedora/29

test/fedora/29:
  <<: *test
  variables:
    DOCKER_IMAGE: fedora/29
  dependencies:
    - build/fedora/29

upload/fedora/29:
  <<: *upload
  dependencies:
    - build/fedora/29

build/fedora/28:
  <<: *build
  variables:
    DOCKER_IMAGE: fedora/28

test/fedora/28:
  <<: *test
  variables:
    DOCKER_IMAGE: fedora/28
  dependencies:
    - build/fedora/28

upload/fedora/28:
  <<: *upload
  dependencies:
    - build/fedora/28

Markus Frosch's avatar
Markus Frosch committed
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
###################################
# 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

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

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

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

###################################
# 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

build/opensuse/42.3:
  <<: *build
  variables:
    DOCKER_IMAGE: opensuse/42.3

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

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