@@ -36,18 +36,25 @@ jobs:
36
36
run : make check-gitlint
37
37
38
38
build-server :
39
+ # Reminder: the nightly-server images consume nightly samba rpm builds
40
+ # it is not *just* an image that gets built nightly
39
41
strategy :
40
42
matrix :
43
+ package_source : [default, nightly]
41
44
os : [centos, fedora, opensuse]
42
45
arch : [amd64]
46
+ exclude :
47
+ # there are no nightly packages for opensuse
48
+ - package_source : nightly
49
+ os : opensuse
43
50
runs-on : ubuntu-latest
44
51
env :
45
52
BUILDAH_FORMAT : oci
46
- IMG_TAG : default -${{ matrix.os }}-${{ matrix.arch }}
53
+ IMG_TAG : ${{ matrix.package_source }} -${{ matrix.os }}-${{ matrix.arch }}
47
54
steps :
48
55
- uses : actions/checkout@v3
49
56
- name : Build the server image
50
- run : make KIND=server OS_NAME=${{ matrix.os}} BUILD_ARCH=${{ matrix.arch}} build-image
57
+ run : make KIND=server PACKAGE_SOURCE=${{ matrix.package_source }} OS_NAME=${{ matrix.os}} BUILD_ARCH=${{ matrix.arch}} build-image
51
58
- name : Upload server image
52
59
53
60
with :
@@ -58,18 +65,24 @@ jobs:
58
65
build-ad-server :
59
66
strategy :
60
67
matrix :
68
+ package_source : [default, nightly]
61
69
os : [centos, fedora, opensuse]
62
70
arch : [amd64]
63
71
exclude :
64
- - os : centos
72
+ # there are no nightly packages for opensuse
73
+ - package_source : nightly
74
+ os : opensuse
75
+ # the distro packages for centos do not include an ad-dc
76
+ - package_source : default
77
+ os : centos
65
78
runs-on : ubuntu-latest
66
79
env :
67
80
BUILDAH_FORMAT : oci
68
- IMG_TAG : default -${{ matrix.os }}-${{ matrix.arch }}
81
+ IMG_TAG : ${{ matrix.package_source }} -${{ matrix.os }}-${{ matrix.arch }}
69
82
steps :
70
83
- uses : actions/checkout@v3
71
84
- name : Build the ad server image
72
- run : make KIND=ad-server OS_NAME=${{matrix.os}} BUILD_ARCH=${{matrix.arch}} build-image
85
+ run : make KIND=ad-server PACKAGE_SOURCE=${{ matrix.package_source }} OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
73
86
- name : Upload ad server image
74
87
75
88
with :
@@ -130,13 +143,18 @@ jobs:
130
143
test-server :
131
144
strategy :
132
145
matrix :
146
+ package_source : [default, nightly]
133
147
os : [centos, fedora, opensuse]
134
148
arch : [amd64]
149
+ exclude :
150
+ # there are no nightly packages for opensuse
151
+ - package_source : nightly
152
+ os : opensuse
135
153
needs : build-server
136
154
runs-on : ubuntu-latest
137
155
env :
138
156
BUILDAH_FORMAT : oci
139
- IMG_TAG : default -${{ matrix.os }}-${{ matrix.arch }}
157
+ IMG_TAG : ${{ matrix.package_source }} -${{ matrix.os }}-${{ matrix.arch }}
140
158
steps :
141
159
- uses : actions/checkout@v3
142
160
- name : Download server image
@@ -147,83 +165,27 @@ jobs:
147
165
- name : Test the server image
148
166
run : LOCAL_TAG=samba-server:${{ env.IMG_TAG }} tests/test-samba-container.sh
149
167
150
- # Reminder: the nightly-server images consume nightly samba rpm builds
151
- # it is not *just* an image that gets built nightly
152
- build-nightly-server :
153
- strategy :
154
- matrix :
155
- os : [centos, fedora]
156
- arch : [amd64]
157
- runs-on : ubuntu-latest
158
- env :
159
- BUILDAH_FORMAT : oci
160
- IMG_TAG : nightly-${{ matrix.os }}-${{ matrix.arch }}
161
- steps :
162
- - uses : actions/checkout@v3
163
- - name : Build the nightly server image
164
- run : make KIND=server PACKAGE_SOURCE=nightly OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
165
- - name : Upload nightly server image
166
-
167
- with :
168
- image : " samba-server:${{ env.IMG_TAG }}"
169
- container_engine : ${{ env.CONTAINER_CMD }}
170
- retention_days : 1
171
-
172
- build-nightly-ad-server :
173
- strategy :
174
- matrix :
175
- os : [centos, fedora]
176
- arch : [amd64]
177
- runs-on : ubuntu-latest
178
- env :
179
- BUILDAH_FORMAT : oci
180
- IMG_TAG : nightly-${{ matrix.os }}-${{ matrix.arch }}
181
- steps :
182
- - uses : actions/checkout@v3
183
- - name : Build the nightly ad server image
184
- run : make KIND=ad-server PACKAGE_SOURCE=nightly OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-image
185
- - name : Upload nightly AD server image
186
-
187
- with :
188
- image : " samba-ad-server:${{ env.IMG_TAG }}"
189
- container_engine : ${{ env.CONTAINER_CMD }}
190
- retention_days : 1
191
-
192
- test-nightly-server :
193
- strategy :
194
- matrix :
195
- os : [centos, fedora]
196
- arch : [amd64]
197
- needs : build-nightly-server
198
- runs-on : ubuntu-latest
199
- env :
200
- BUILDAH_FORMAT : oci
201
- IMG_TAG : nightly-${{ matrix.os }}-${{ matrix.arch }}
202
- steps :
203
- - uses : actions/checkout@v3
204
- - name : Download nightly server image
205
-
206
- with :
207
- image : " samba-server:${{ env.IMG_TAG }}"
208
- container_engine : ${{ env.CONTAINER_CMD }}
209
- - name : Test the nightly server image
210
- run : LOCAL_TAG=samba-server:${{ env.IMG_TAG }} tests/test-samba-container.sh
211
-
212
168
test-ad-server-kubernetes :
213
169
strategy :
214
170
matrix :
171
+ package_source : [default, nightly]
215
172
os : [centos, fedora, opensuse]
216
173
arch : [amd64]
217
174
exclude :
218
- - os : centos
175
+ # there are no nightly packages for opensuse
176
+ - package_source : nightly
177
+ os : opensuse
178
+ # the distro packages for centos do not include an ad-dc
179
+ - package_source : default
180
+ os : centos
219
181
needs :
220
182
- build-ad-server
221
183
- build-server
222
184
# need to explicitly use 20.04 to avoid problems with jq...
223
185
runs-on : ubuntu-20.04
224
186
env :
225
187
BUILDAH_FORMAT : oci
226
- IMG_TAG : default -${{ matrix.os }}-${{ matrix.arch }}
188
+ IMG_TAG : ${{ matrix.package_source }} -${{ matrix.os }}-${{ matrix.arch }}
227
189
steps :
228
190
- uses : actions/checkout@v3
229
191
- uses : nolar/setup-k3d-k3s@v1
@@ -244,48 +206,13 @@ jobs:
244
206
- name : run the ad-dc deployment test
245
207
run : ./tests/test-samba-ad-server-kubernetes.sh
246
208
247
- test-nightly-ad-server-kubernetes :
248
- strategy :
249
- matrix :
250
- os : [centos, fedora]
251
- arch : [amd64]
252
- needs :
253
- - build-nightly-server
254
- - build-nightly-ad-server
255
- # need to explicitly use 20.04 to avoid problems with jq...
256
- runs-on : ubuntu-20.04
257
- env :
258
- BUILDAH_FORMAT : oci
259
- IMG_TAG : nightly-${{ matrix.os }}-${{ matrix.arch }}
260
- steps :
261
- - uses : actions/checkout@v3
262
- - uses : nolar/setup-k3d-k3s@v1
263
- - name : get nodes
264
- run : kubectl get nodes
265
- - name : Download nightly ad server image
266
-
267
- with :
268
- image : " samba-ad-server:${{ env.IMG_TAG }}"
269
- container_engine : ${{ env.CONTAINER_CMD }}
270
- - name : Download nightly file server image
271
-
272
- with :
273
- image : " samba-server:${{ env.IMG_TAG }}"
274
- container_engine : ${{ env.CONTAINER_CMD }}
275
- - name : import images to k3d
276
- run : k3d image import samba-server:${{ env.IMG_TAG }} samba-ad-server:${{ env.IMG_TAG }}
277
- - name : run the ad-dc deployment test
278
- run : ./tests/test-samba-ad-server-kubernetes.sh
279
-
280
209
push :
281
210
# verify it passes the test jobs first
282
211
needs :
283
212
- build-client
284
213
- build-toolbox
285
214
- test-server
286
- - test-nightly-server
287
215
- test-ad-server-kubernetes
288
- - test-nightly-ad-server-kubernetes
289
216
runs-on : ubuntu-latest
290
217
if : (github.event_name == 'push' || github.event_name == 'schedule') && github.repository == 'samba-in-kubernetes/samba-container'
291
218
steps :
0 commit comments