.gitlab-ci.yml 2.8 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
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
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84

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
85

Markus Frosch's avatar
Markus Frosch committed
86
87
88
###################################
# Fedora
###################################
Markus Frosch's avatar
Markus Frosch committed
89
build/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
90
91
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
92
    DOCKER_IMAGE: fedora/30
Markus Frosch's avatar
Markus Frosch committed
93

Markus Frosch's avatar
Markus Frosch committed
94
test/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
95
96
  <<: *test
  variables:
Markus Frosch's avatar
Markus Frosch committed
97
    DOCKER_IMAGE: fedora/30
Markus Frosch's avatar
Markus Frosch committed
98
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
99
    - build/fedora/30
Markus Frosch's avatar
Markus Frosch committed
100

Markus Frosch's avatar
Markus Frosch committed
101
upload/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
102
103
  <<: *upload
  dependencies:
Markus Frosch's avatar
Markus Frosch committed
104
    - build/fedora/30
Markus Frosch's avatar
Markus Frosch committed
105

Markus Frosch's avatar
Markus Frosch committed
106
build/fedora/29:
Markus Frosch's avatar
Markus Frosch committed
107
108
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
109
    DOCKER_IMAGE: fedora/29
Markus Frosch's avatar
Markus Frosch committed
110

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

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

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