forked from openresty/docker-openresty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
408 lines (392 loc) · 24.3 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# docker-openresty .travis.yml
#
# Builds docker-openresty images on Travis CI
#
# https://travis-ci.org/neomantra/docker-openresty
#
#
# Master will build with Docker tag:
# openresty:<flavor>
#
# Releases should be tagged in git as:
# <openresty-version>-<docker-version>
#
# This will build with Docker tags:
# openresty:<openresty-version>-<docker-version>-<flavor>
# openresty:<openresty-version>-<flavor>
#
os: linux
dist: bionic
language: ruby
services:
- docker
stages:
- build
- manifest
jobs:
include:
- name: build docker image for arm64 flavors alpine and alpine-fat
stage: build
arch: amd64
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-amd64 -f alpine/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-amd64 $DOCKER_ORG/openresty:alpine-amd64 &&
docker push $DOCKER_ORG/openresty:alpine-amd64 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-amd64 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-amd64 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-amd64 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-amd64 $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-amd64 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-amd64 ;
fi
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-fat-amd64 -f alpine/Dockerfile.fat --build-arg RESTY_IMAGE_TAG="alpine-amd64" .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-amd64 $DOCKER_ORG/openresty:alpine-fat-amd64 &&
docker push $DOCKER_ORG/openresty:alpine-fat-amd64 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-amd64 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-amd64 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-amd64 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-amd64 $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-amd64 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-amd64 ;
fi
- name: build docker image for arm64 flavors alpine and alpine-fat
stage: build
arch: arm64
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-arm64v8 -f alpine/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-arm64v8 $DOCKER_ORG/openresty:alpine-arm64v8 &&
docker push $DOCKER_ORG/openresty:alpine-arm64v8 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-arm64v8 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-arm64v8 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-arm64v8 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-arm64v8 $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-arm64v8 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-arm64v8 ;
fi
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-fat-arm64v8 -f alpine/Dockerfile.fat --build-arg RESTY_IMAGE_TAG="alpine-arm64v8" .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-arm64v8 $DOCKER_ORG/openresty:alpine-fat-arm64v8 &&
docker push $DOCKER_ORG/openresty:alpine-fat-arm64v8 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-arm64v8 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-arm64v8 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-arm64v8 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-arm64v8 $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-arm64v8 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-arm64v8 ;
fi
- name: build docker image for flavor alpine-apk
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-apk -f alpine-apk/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-apk $DOCKER_ORG/openresty:alpine-apk &&
docker push $DOCKER_ORG/openresty:alpine-apk ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-apk $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-apk &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-apk ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-apk $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-apk &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-apk ;
fi
# aliased as `centos-rpm`
- name: build docker image for flavor centos
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:centos -f centos/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:centos $DOCKER_ORG/openresty:centos &&
docker push $DOCKER_ORG/openresty:centos ;
docker tag $DOCKER_ORG/openresty:centos $DOCKER_ORG/openresty:centos-rpm &&
docker push $DOCKER_ORG/openresty:centos-rpm ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:centos $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-centos &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-centos ;
docker tag $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-centos $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-centos-rpm &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-centos-rpm ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:centos $DOCKER_ORG/openresty:$TRAVIS_TAG-centos &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-centos ;
docker tag $DOCKER_ORG/openresty:$TRAVIS_TAG-centos $DOCKER_ORG/openresty:$TRAVIS_TAG-centos-rpm &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-centos-rpm ;
fi
- name: build docker image for flavor Amazon Linux (amzn2)
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:amzn2 --build-arg RESTY_IMAGE_BASE=amazonlinux --build-arg RESTY_IMAGE_TAG=2 --build-arg RESTY_YUM_REPO="https://openresty.org/package/amazon/openresty.repo" --build-arg RESTY_RPM_DIST="amzn2" -f centos/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:amzn2 $DOCKER_ORG/openresty:amzn2 &&
docker push $DOCKER_ORG/openresty:amzn2 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:amzn2 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-amzn2 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-amzn2 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:amzn2 $DOCKER_ORG/openresty:$TRAVIS_TAG-amzn2 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-amzn2 ;
fi
- name: build docker image for flavor buster and buster-fat
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:buster -f buster/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster $DOCKER_ORG/openresty:buster &&
docker push $DOCKER_ORG/openresty:buster ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster $DOCKER_ORG/openresty:latest &&
docker push $DOCKER_ORG/openresty:latest ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-buster &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-buster ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster $DOCKER_ORG/openresty:$TRAVIS_TAG-buster &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-buster ;
fi
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:buster-fat -f buster/Dockerfile.fat .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster-fat $DOCKER_ORG/openresty:buster-fat &&
docker push $DOCKER_ORG/openresty:buster-fat ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster-fat $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-buster-fat &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-buster-fat ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:buster-fat $DOCKER_ORG/openresty:$TRAVIS_TAG-buster-fat &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-buster-fat ;
fi
- name: build docker image for flavor bionic
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:bionic -f bionic/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:bionic $DOCKER_ORG/openresty:bionic &&
docker push $DOCKER_ORG/openresty:bionic ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:bionic $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-bionic &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-bionic ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:bionic $DOCKER_ORG/openresty:$TRAVIS_TAG-bionic &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-bionic ;
fi
- name: build docker image for flavor focal
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:focal -f focal/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:focal $DOCKER_ORG/openresty:focal &&
docker push $DOCKER_ORG/openresty:focal ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:focal $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-focal &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-focal ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:focal $DOCKER_ORG/openresty:$TRAVIS_TAG-focal &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-focal ;
fi
- name: build docker image for flavors alpine-nosse42 and alpine-fat-nosse42
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-nosse42 -f alpine/Dockerfile --build-arg RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -mno-sse4.2'" .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-nosse42 $DOCKER_ORG/openresty:alpine-nosse42 &&
docker push $DOCKER_ORG/openresty:alpine-nosse42 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-nosse42 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-nosse42 ;
fi
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:alpine-fat-nosse42 -f alpine/Dockerfile.fat --build-arg RESTY_IMAGE_TAG="alpine-nosse42" .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-nosse42 $DOCKER_ORG/openresty:alpine-fat-nosse42 &&
docker push $DOCKER_ORG/openresty:alpine-fat-nosse42 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-nosse42 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:alpine-fat-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-nosse42 ;
fi
- name: build docker image for flavor bionic-nosse42
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:bionic-nosse42 -f bionic/Dockerfile --build-arg RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -mno-sse4.2'" .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:bionic-nosse42 $DOCKER_ORG/openresty:bionic-nosse42 &&
docker push $DOCKER_ORG/openresty:bionic-nosse42 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:bionic-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-bionic-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-bionic-nosse42 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:bionic-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG-bionic-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-bionic-nosse42 ;
fi
- name: build docker image for flavor focal-nosse42
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:focal-nosse42 -f focal/Dockerfile --build-arg RESTY_LUAJIT_OPTIONS="--with-luajit-xcflags='-DLUAJIT_NUMMODE=2 -DLUAJIT_ENABLE_LUA52COMPAT -mno-sse4.2'" .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:focal-nosse42 $DOCKER_ORG/openresty:focal-nosse42 &&
docker push $DOCKER_ORG/openresty:focal-nosse42 ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:focal-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-focal-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-focal-nosse42 ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:focal-nosse42 $DOCKER_ORG/openresty:$TRAVIS_TAG-focal-nosse42 &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-focal-nosse42 ;
fi
# aliased as `fedora-rpm`
- name: build docker image for flavor fedora
stage: build
script:
- echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin
- docker build -t openresty:fedora -f fedora/Dockerfile .
- if [[ "$TRAVIS_BRANCH" == "master" ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:fedora $DOCKER_ORG/openresty:fedora &&
docker push $DOCKER_ORG/openresty:fedora ;
docker tag $DOCKER_ORG/openresty:fedora $DOCKER_ORG/openresty:fedora-rpm &&
docker push $DOCKER_ORG/openresty:fedora-rpm ;
fi
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:fedora $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-fedora &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-fedora ;
docker tag $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-fedora $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-fedora-rpm &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-fedora-rpm ;
fi ;
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin &&
docker tag openresty:fedora $DOCKER_ORG/openresty:$TRAVIS_TAG-fedora &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-fedora ;
docker tag $DOCKER_ORG/openresty:$TRAVIS_TAG-fedora $DOCKER_ORG/openresty:$TRAVIS_TAG-fedora-rpm &&
docker push $DOCKER_ORG/openresty:$TRAVIS_TAG-fedora-rpm ;
fi
- name: push manifests for multi-arch builds
stage: manifest
script:
- export DOCKER_CLI_EXPERIMENTAL=enabled
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker manifest create $DOCKER_ORG/openresty:alpine --amend $DOCKER_ORG/openresty:alpine-amd64 --amend $DOCKER_ORG/openresty:alpine-arm64v8 &&
docker manifest push $DOCKER_ORG/openresty:alpine
- docker manifest create $DOCKER_ORG/openresty:alpine-fat --amend $DOCKER_ORG/openresty:alpine-fat-amd64 --amend $DOCKER_ORG/openresty:alpine-fat-arm64v8 &&
docker manifest push $DOCKER_ORG/openresty:alpine-fat
- if [[ "$TRAVIS_TAG" ]] ; then
TRAVIS_TAG_BASE=$(echo -n "$TRAVIS_TAG" | sed 's/-[0-9]$//g') ;
if [[ ( "$TRAVIS_TAG_BASE" ) && ( "$TRAVIS_TAG_BASE" != "$TRAVIS_TAG" ) ]] ; then
docker manifest create $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine --amend $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-amd64 --amend $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-arm64v8 &&
docker manifest push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine ;
docker manifest create $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat --amend $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-amd64 --amend $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat-arm64v8 &&
docker manifest push $DOCKER_ORG/openresty:$TRAVIS_TAG_BASE-alpine-fat ;
fi ;
docker manifest create $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine --amend $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-amd64 --amend $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-arm64v8 &&
docker manifest push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine ;
docker manifest create $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat --amend $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-amd64 --amend $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat-arm64v8 &&
docker manifest push $DOCKER_ORG/openresty:$TRAVIS_TAG-alpine-fat ;
fi