10
10
11
11
env :
12
12
CONTAINER_CMD : docker
13
-
14
13
jobs :
15
-
16
- check :
14
+ checks :
17
15
runs-on : ubuntu-latest
18
16
steps :
19
17
- uses : actions/checkout@v3
@@ -39,100 +37,67 @@ jobs:
39
37
40
38
build-server :
41
39
runs-on : ubuntu-latest
40
+ strategy :
41
+ matrix :
42
+ os : [centos, fedora]
43
+ arch : [amd64]
42
44
env :
43
45
BUILDAH_FORMAT : oci
44
46
steps :
45
47
- uses : actions/checkout@v3
46
48
- name : Build the server image
47
- run : make build-server
48
- - name : Upload server image
49
- uses : ishworkh/docker-image-artifact-upload@v1
50
- with :
51
- image : " samba-server:latest"
52
- retention_days : 1
53
- build-server-centos :
54
- runs-on : ubuntu-latest
55
- steps :
56
- - uses : actions/checkout@v3
57
- - name : Build the CentOS based server image
58
- run : make OS_NAME=centos build-server
49
+ run : make OS_NAME=${{ matrix.os}} BUILD_ARCH=${{ matrix.arch}} build-server
59
50
- name : Upload server image
60
51
uses : ishworkh/docker-image-artifact-upload@v1
61
52
with :
62
- image : " samba-server:centos -latest"
53
+ image : " samba-server:${{ matrix.os }} -latest"
63
54
retention_days : 1
64
55
65
- test-server-centos :
66
- needs : build-server-centos
67
- runs-on : ubuntu-latest
68
- steps :
69
- - uses : actions/checkout@v3
70
- - name : Download server image
71
- uses : ishworkh/docker-image-artifact-download@v1
72
- with :
73
- image : " samba-server:centos-latest"
74
- - name : Test the server image
75
- run : LOCAL_TAG=samba-server:centos-latest tests/test-samba-container.sh
76
-
77
56
build-ad-server :
57
+ strategy :
58
+ matrix :
59
+ os : [centos, fedora]
60
+ arch : [amd64]
61
+ exclude :
62
+ - os : centos
78
63
runs-on : ubuntu-latest
79
64
env :
80
65
BUILDAH_FORMAT : oci
81
66
steps :
82
67
- uses : actions/checkout@v3
83
68
- name : Build the ad server image
84
- run : make build-ad-server
69
+ run : make OS_NAME=${{matrix.os}} BUILD_ARCH=${{matrix.arch}} build-ad-server
85
70
- name : Upload ad server image
86
71
uses : ishworkh/docker-image-artifact-upload@v1
87
72
with :
88
- image : " samba-ad-server:latest"
89
- retention_days : 1
90
- build-client-centos :
91
- runs-on : ubuntu-latest
92
- steps :
93
- - uses : actions/checkout@v3
94
- - name : Build the centos client image
95
- run : make OS_NAME=centos build-client
96
- # Here we upload samba-client image to artifacts locally for consumption
97
- # during samba-toolbox build process.
98
- - name : Upload client image
99
- uses : ishworkh/docker-image-artifact-upload@v1
100
- with :
101
- image : " quay.io/samba.org/samba-client:centos-latest"
73
+ image : " samba-ad-server:${{ matrix.os}}-latest"
102
74
retention_days : 1
103
75
104
- build-toolbox-centos :
105
- needs : build-client-centos
106
- runs-on : ubuntu-latest
107
- steps :
108
- - uses : actions/checkout@v3
109
- # Download locally stored samba-client image to be used as base for building
110
- # samba-toolbox.
111
- - name : Download client image
112
- uses : ishworkh/docker-image-artifact-download@v1
113
- with :
114
- image : " quay.io/samba.org/samba-client:centos-latest"
115
- - name : Build the toolbox image
116
- run : make OS_NAME=centos build-toolbox
117
-
118
-
119
76
build-client :
120
- runs-on : ubuntu-latest
77
+ strategy :
78
+ matrix :
79
+ os : [centos, fedora]
80
+ arch : [amd64]
121
81
env :
122
82
BUILDAH_FORMAT : oci
83
+ runs-on : ubuntu-latest
123
84
steps :
124
85
- uses : actions/checkout@v3
125
- - name : Build the client image
126
- run : make build-client
86
+ - name : build the client image
87
+ run : make OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-client
127
88
# Here we upload samba-client image to artifacts locally for consumption
128
- # during samba-toolbox build process.
129
- - name : Upload client image
89
+ # during the samba-toolbox build process.
90
+ - name : Upload the client image
130
91
uses : ishworkh/docker-image-artifact-upload@v1
131
92
with :
132
- image : " quay.io/samba.org/samba-client:latest"
93
+ image : " quay.io/samba.org/samba-client:${{ matrix.os }}- latest"
133
94
retention_days : 1
134
95
135
96
build-toolbox :
97
+ strategy :
98
+ matrix :
99
+ os : [centos, fedora]
100
+ arch : [amd64]
136
101
needs : build-client
137
102
runs-on : ubuntu-latest
138
103
env :
@@ -144,97 +109,96 @@ jobs:
144
109
- name : Download client image
145
110
uses : ishworkh/docker-image-artifact-download@v1
146
111
with :
147
- image : " quay.io/samba.org/samba-client:latest"
112
+ image : " quay.io/samba.org/samba-client:${{ matrix.os }}- latest"
148
113
- name : Build the toolbox image
149
- run : make build-toolbox
114
+ run : make OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-toolbox
150
115
151
116
test-server :
117
+ strategy :
118
+ matrix :
119
+ os : [centos, fedora]
120
+ arch : [amd64]
152
121
needs : build-server
153
122
runs-on : ubuntu-latest
154
123
steps :
155
124
- uses : actions/checkout@v3
156
125
- name : Download server image
157
126
uses : ishworkh/docker-image-artifact-download@v1
158
127
with :
159
- image : " samba-server:latest"
128
+ image : " samba-server:${{ matrix.os }}- latest"
160
129
- name : Test the server image
161
- run : tests/test-samba-container.sh
130
+ run : LOCAL_TAG="samba-server:${{ matrix.os}}-latest" tests/test-samba-container.sh
162
131
163
132
# Reminder: the nightly-server images consume nightly samba rpm builds
164
133
# it is not *just* an image that gets built nightly
165
134
build-nightly-server :
166
135
runs-on : ubuntu-latest
136
+ strategy :
137
+ matrix :
138
+ os : [centos, fedora]
139
+ arch : [amd64]
167
140
env :
168
141
BUILDAH_FORMAT : oci
169
142
steps :
170
143
- uses : actions/checkout@v3
171
144
- name : Build the nightly server image
172
- run : make build-nightly-server
145
+ run : make OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-nightly-server
173
146
- name : Upload nightly server image
174
147
uses : ishworkh/docker-image-artifact-upload@v1
175
148
with :
176
- image : " samba-server:nightly"
177
- retention_days : 1
178
-
179
- build-nightly-server-centos :
180
- runs-on : ubuntu-latest
181
- env :
182
- BUILDAH_FORMAT : oci
183
- steps :
184
- - uses : actions/checkout@v3
185
- - name : Build the nightly server image
186
- run : make OS_NAME=centos build-nightly-server
187
- - name : Upload nightly server image
188
- uses : ishworkh/docker-image-artifact-upload@v1
189
- with :
190
- image : " samba-server:centos-nightly"
149
+ image : " samba-server:${{ matrix.os }}-nightly"
191
150
retention_days : 1
192
151
193
152
build-nightly-ad-server :
194
153
runs-on : ubuntu-latest
154
+ strategy :
155
+ matrix :
156
+ os : [centos, fedora]
157
+ arch : [amd64]
158
+ exclude :
159
+ - os : centos
195
160
env :
196
161
BUILDAH_FORMAT : oci
197
162
steps :
198
163
- uses : actions/checkout@v3
199
164
- name : Build the nightly ad server image
200
- run : make build-nightly-ad-server
201
- - name : Upload nightly ad server image
165
+ run : make OS_NAME=${{ matrix.os }} BUILD_ARCH=${{ matrix.arch }} build-nightly-ad-server
166
+ - name : Upload nightly AD server image
202
167
uses : ishworkh/docker-image-artifact-upload@v1
203
168
with :
204
- image : " samba-ad-server:nightly"
169
+ image : " samba-ad-server:${{ matrix.os }}- nightly"
205
170
retention_days : 1
206
171
207
172
test-nightly-server :
173
+ strategy :
174
+ matrix :
175
+ os : [centos, fedora]
176
+ arch : [amd64]
208
177
needs : build-nightly-server
209
178
runs-on : ubuntu-latest
210
179
steps :
211
180
- uses : actions/checkout@v3
212
181
- name : Download nightly server image
213
182
uses : ishworkh/docker-image-artifact-download@v1
214
183
with :
215
- image : " samba-server:nightly"
184
+ image : " samba-server:${{ matrix.os }}- nightly"
216
185
- name : Test the nightly server image
217
- run : LOCAL_TAG=samba-server:nightly tests/test-samba-container.sh
218
-
219
- test-nightly-server-centos :
220
- needs : build-nightly-server-centos
221
- runs-on : ubuntu-latest
222
- steps :
223
- - uses : actions/checkout@v3
224
- - name : Download nightly server image
225
- uses : ishworkh/docker-image-artifact-download@v1
226
- with :
227
- image : " samba-server:centos-nightly"
228
- - name : Test the nightly server image
229
- run : LOCAL_TAG=samba-server:centos-nightly tests/test-samba-container.sh
186
+ run : LOCAL_TAG=samba-server:${{ matrix.os }}-nightly tests/test-samba-container.sh
230
187
231
188
test-ad-server-kubernetes :
189
+ strategy :
190
+ matrix :
191
+ os : [centos, fedora]
192
+ arch : [amd64]
193
+ exclude :
194
+ - os : centos
232
195
needs :
233
196
- build-ad-server
234
197
- build-server
235
- # runs-on: ubuntu-latest
236
198
# need to explicitly use 20.04 to avoid problems with jq...
237
199
runs-on : ubuntu-20.04
200
+ env :
201
+ IMG_TAG : ${{ matrix.os }}-latest
238
202
steps :
239
203
- uses : actions/checkout@v3
240
204
- uses : nolar/setup-k3d-k3s@v1
@@ -243,44 +207,49 @@ jobs:
243
207
- name : Download ad server image
244
208
uses : ishworkh/docker-image-artifact-download@v1
245
209
with :
246
- image : " samba-ad-server:latest"
210
+ image : " samba-ad-server:${{ matrix.os }}- latest"
247
211
- name : import ad server image
248
- run : k3d image import samba-ad-server:latest
212
+ run : k3d image import samba-ad-server:${{ matrix.os }}- latest
249
213
- name : Download file server image
250
214
uses : ishworkh/docker-image-artifact-download@v1
251
215
with :
252
- image : " samba-server:latest"
216
+ image : " samba-server:${{ matrix.os }}- latest"
253
217
- name : import file server image
254
- run : k3d image import samba-server:latest
218
+ run : k3d image import samba-server:${{ matrix.os }}- latest
255
219
- name : run the ad-dc deployment test
256
220
run : ./tests/test-samba-ad-server-kubernetes.sh
257
221
258
222
test-nightly-ad-server-kubernetes :
259
- needs :
260
- - build-nightly-ad-server
261
- - build-nightly-server
262
- # runs-on: ubuntu-latest
263
- # need to explicitly use 20.04 to avoid problems with jq...
264
- runs-on : ubuntu-20.04
265
- env :
266
- IMG_TAG : nightly
267
- steps :
223
+ strategy :
224
+ matrix :
225
+ os : [centos, fedora]
226
+ arch : [amd64]
227
+ exclude :
228
+ - os : centos
229
+ needs :
230
+ - build-nightly-server
231
+ - build-nightly-ad-server
232
+ # need to explicitly use 20.04 to avoid problems with jq...
233
+ runs-on : ubuntu-20.04
234
+ env :
235
+ IMG_TAG : ${{ matrix.os }}-nightly
236
+ steps :
268
237
- uses : actions/checkout@v3
269
238
- uses : nolar/setup-k3d-k3s@v1
270
239
- name : get nodes
271
240
run : kubectl get nodes
272
241
- name : Download nightly ad server image
273
242
uses : ishworkh/docker-image-artifact-download@v1
274
243
with :
275
- image : " samba-ad-server:nightly"
244
+ image : " samba-ad-server:${{ matrix.os }}- nightly"
276
245
- name : import nightly ad server image
277
- run : k3d image import samba-ad-server:nightly
246
+ run : k3d image import samba-ad-server:${{ matrix.os }}- nightly
278
247
- name : Download nightly file server image
279
248
uses : ishworkh/docker-image-artifact-download@v1
280
249
with :
281
- image : " samba-server:nightly"
250
+ image : " samba-server:${{ matrix.os }}- nightly"
282
251
- name : import nightly file server image
283
- run : k3d image import samba-server:nightly
252
+ run : k3d image import samba-server:${{ matrix.os }}- nightly
284
253
- name : run the ad-dc deployment test
285
254
run : ./tests/test-samba-ad-server-kubernetes.sh
286
255
0 commit comments