.gitlab-ci.yml 2.87 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
46
  only:
    - nonexisting_branch
Markus Frosch's avatar
Markus Frosch committed
47
  # TODO: enable when switching to GitLab CI
Markus Frosch's avatar
Markus Frosch committed
48
  #  - master
Markus Frosch's avatar
Markus Frosch committed
49
  #  - 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
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
###################################
# Fedora
###################################
Markus Frosch's avatar
Markus Frosch committed
91
build/fedora/30:
Markus Frosch's avatar
Markus Frosch committed
92
93
  <<: *build
  variables:
Markus Frosch's avatar
Markus Frosch committed
94
    DOCKER_IMAGE: fedora/30
Markus Frosch's avatar
Markus Frosch committed
95

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

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

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

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

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

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