.gitlab-ci.yml 3.85 KB
Newer Older
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:
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

.build: &build
  stage: build
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - icinga-build-package
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - ccache/
      - 'icinga2.git'
  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
  only:
Markus Frosch's avatar
Markus Frosch committed
46
47
    - master
    - tags
48
49
50
51

###################################
# Debian
###################################
Markus Frosch's avatar
Markus Frosch committed
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
build/debian/buster:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/buster

test/debian/buster:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/buster
  dependencies:
    - build/debian/buster

build/debian/buster:x86:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/buster:x86

test/debian/buster:x86:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/buster:x86
  dependencies:
    - build/debian/buster:x86
    - build/debian/buster

upload/debian/buster:
  <<: *upload
  dependencies:
    - build/debian/buster:x86
    - build/debian/buster

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
build/debian/stretch:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/stretch

test/debian/stretch:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/stretch
  dependencies:
    - build/debian/stretch

build/debian/stretch:x86:
  <<: *build
  variables:
    DOCKER_IMAGE: debian/stretch:x86

test/debian/stretch:x86:
  <<: *test
  variables:
    DOCKER_IMAGE: debian/stretch:x86
  dependencies:
    - build/debian/stretch:x86
Markus Frosch's avatar
Markus Frosch committed
106
    - build/debian/stretch
107
108
109
110
111
112
113

upload/debian/stretch:
  <<: *upload
  dependencies:
    - build/debian/stretch:x86
    - build/debian/stretch

Markus Frosch's avatar
Markus Frosch committed
114
115
116
117
###################################
# Ubuntu
###################################
build/ubuntu/disco:
Markus Frosch's avatar
Markus Frosch committed
118
119
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
120
121
    ICINGA_BUILD_DEB_FLAVOR: stretch
    DOCKER_IMAGE: ubuntu/disco
Markus Frosch's avatar
Markus Frosch committed
122

Markus Frosch's avatar
Markus Frosch committed
123
test/ubuntu/disco:
Markus Frosch's avatar
Markus Frosch committed
124
125
  <<: *test
  variables:
Markus Frosch's avatar
Markus Frosch committed
126
    DOCKER_IMAGE: ubuntu/disco
Markus Frosch's avatar
Markus Frosch committed
127
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
128
    - build/ubuntu/disco
Markus Frosch's avatar
Markus Frosch committed
129

Markus Frosch's avatar
Markus Frosch committed
130
build/ubuntu/disco:x86:
Markus Frosch's avatar
Markus Frosch committed
131
132
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
133
134
    ICINGA_BUILD_DEB_FLAVOR: stretch
    DOCKER_IMAGE: ubuntu/disco:x86
Markus Frosch's avatar
Markus Frosch committed
135

Markus Frosch's avatar
Markus Frosch committed
136
test/ubuntu/disco:x86:
Markus Frosch's avatar
Markus Frosch committed
137
138
  <<: *test
  variables:
Markus Frosch's avatar
Markus Frosch committed
139
    DOCKER_IMAGE: ubuntu/disco:x86
Markus Frosch's avatar
Markus Frosch committed
140
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
141
142
    - build/ubuntu/disco:x86
    - build/ubuntu/disco
Markus Frosch's avatar
Markus Frosch committed
143

Markus Frosch's avatar
Markus Frosch committed
144
upload/ubuntu/disco:
Markus Frosch's avatar
Markus Frosch committed
145
146
  <<: *upload
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
147
148
    - build/ubuntu/disco:x86
    - build/ubuntu/disco
Markus Frosch's avatar
Markus Frosch committed
149
150
151
152

build/ubuntu/bionic:
  <<: *build
  variables:
153
    ICINGA_BUILD_DEB_FLAVOR: stretch
Markus Frosch's avatar
Markus Frosch committed
154
155
156
157
158
159
160
161
162
163
164
165
    DOCKER_IMAGE: ubuntu/bionic

test/ubuntu/bionic:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/bionic
  dependencies:
    - build/ubuntu/bionic

build/ubuntu/bionic:x86:
  <<: *build
  variables:
166
    ICINGA_BUILD_DEB_FLAVOR: stretch
Markus Frosch's avatar
Markus Frosch committed
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
    DOCKER_IMAGE: ubuntu/bionic:x86

test/ubuntu/bionic:x86:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/bionic:x86
  dependencies:
    - build/ubuntu/bionic:x86
    - build/ubuntu/bionic

upload/ubuntu/bionic:
  <<: *upload
  dependencies:
    - build/ubuntu/bionic:x86
    - build/ubuntu/bionic

build/ubuntu/xenial:
  <<: *build
  variables:
186
    ICINGA_BUILD_DEB_FLAVOR: stretch
Markus Frosch's avatar
Markus Frosch committed
187
188
189
190
191
192
193
194
195
196
197
198
    DOCKER_IMAGE: ubuntu/xenial

test/ubuntu/xenial:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/xenial
  dependencies:
    - build/ubuntu/xenial

build/ubuntu/xenial:x86:
  <<: *build
  variables:
199
    ICINGA_BUILD_DEB_FLAVOR: stretch
Markus Frosch's avatar
Markus Frosch committed
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
    DOCKER_IMAGE: ubuntu/xenial:x86

test/ubuntu/xenial:x86:
  <<: *test
  variables:
    DOCKER_IMAGE: ubuntu/xenial:x86
  dependencies:
    - build/ubuntu/xenial:x86
    - build/ubuntu/xenial

upload/ubuntu/xenial:
  <<: *upload
  dependencies:
    - build/ubuntu/xenial:x86
    - build/ubuntu/xenial