.gitlab-ci.yml 3.82 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
46
47
  # TODO: enable when switching to GitLab CI
  #only:
  #  - tags
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

###################################
# Debian
###################################
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
75
    - build/debian/stretch
76
77
78
79
80
81
82

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

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

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

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

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

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

###################################
# Ubuntu
###################################
build/ubuntu/bionic:
  <<: *build
  variables:
120
    ICINGA_BUILD_DEB_FLAVOR: stretch
Markus Frosch's avatar
Markus Frosch committed
121
122
123
124
125
126
127
128
129
130
131
132
    DOCKER_IMAGE: ubuntu/bionic

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

build/ubuntu/bionic:x86:
  <<: *build
  variables:
133
    ICINGA_BUILD_DEB_FLAVOR: stretch
Markus Frosch's avatar
Markus Frosch committed
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    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:
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/xenial

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

build/ubuntu/xenial: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
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
    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

build/ubuntu/trusty:
  <<: *build
  variables:
    DOCKER_IMAGE: ubuntu/trusty

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

build/ubuntu/trusty:x86:
  <<: *build
  variables:
    DOCKER_IMAGE: ubuntu/trusty:x86

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

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