.gitlab-ci.yml 3.08 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
Michael Friedrich's avatar
Michael Friedrich committed
9
10
  #ICINGA_BUILD_RELEASE_TYPE: 
  #ICINGA_BUILD_TYPE:
Markus Frosch's avatar
Markus Frosch committed
11
  #ICINGA_BUILD_UPSTREAM_BRANCH:
Markus Frosch's avatar
Markus Frosch committed
12
13
14
15
16
17
18
19
20
21
22
23

.build: &build
  stage: build
  tags:
    - docker
  image: ${DOCKER_IMAGE_BASE}/${DOCKER_IMAGE}
  script:
    - icinga-build-package
  cache:
    key: "${CI_JOB_NAME}"
    paths:
      - ccache/
24
      - 'icinga2.git'
Markus Frosch's avatar
Markus Frosch committed
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  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
47
  only:
Markus Frosch's avatar
Markus Frosch committed
48
49
    - master
    - tags
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
70
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103

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
104

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

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

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

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

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

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

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