24
24
- ' v*'
25
25
env :
26
26
GOPRIVATE : github.com/TykTechnologies
27
- VARIATION : inverted
27
+ VARIATION : prod-variation
28
28
DOCKER_BUILD_SUMMARY : false
29
29
DOCKER_BUILD_RECORD_UPLOAD : false
30
30
# startsWith covers pull_request_target too
47
47
goreleaser : ' ci/goreleaser/goreleaser.yml'
48
48
cgo : 1
49
49
rpmvers : ' el/7 el/8 el/9 amazon/2 amazon/2023'
50
- debvers : ' ubuntu/xenial ubuntu/bionic ubuntu/focal ubuntu/jammy debian/jessie debian/buster debian/bullseye debian/bookworm'
50
+ debvers : ' ubuntu/xenial ubuntu/bionic ubuntu/focal ubuntu/jammy ubuntu/noble debian/jessie debian/buster debian/bullseye debian/bookworm debian/trixie '
51
51
outputs :
52
- tags : ${{ steps.ci_metadata .outputs.tags }}
52
+ std_tags : ${{ steps.ci_metadata_std .outputs.tags }}
53
53
commit_author : ${{ steps.set_outputs.outputs.commit_author}}
54
54
steps :
55
55
- name : Checkout of tyk
@@ -145,12 +145,13 @@ jobs:
145
145
if : ${{ matrix.golang_cross == '1.16' }}
146
146
with :
147
147
mask-password : ' true'
148
- - name : Docker metadata for CI
149
- id : ci_metadata
148
+ - name : Docker metadata for std CI
149
+ id : ci_metadata_std
150
150
if : ${{ matrix.golang_cross == '1.16' }}
151
151
uses : docker/metadata-action@v5
152
152
with :
153
- images : ${{ steps.ecr.outputs.registry }}/tyk
153
+ images : |
154
+ ${{ steps.ecr.outputs.registry }}/tyk
154
155
flavor : |
155
156
latest=false
156
157
tags : |
@@ -160,48 +161,57 @@ jobs:
160
161
type=semver,pattern={{major}},prefix=v
161
162
type=semver,pattern={{major}}.{{minor}},prefix=v
162
163
type=semver,pattern={{version}},prefix=v
163
- - name : push image to CI
164
+ - name : push std image to CI
164
165
if : ${{ matrix.golang_cross == '1.16' }}
165
166
uses : docker/build-push-action@v6
166
167
with :
167
168
context : " dist"
168
- platforms : linux/amd64,linux/arm64
169
+ platforms : linux/amd64,linux/arm64,linux/s390x
169
170
file : ci/Dockerfile.std
170
171
provenance : mode=max
171
172
sbom : true
172
173
push : true
173
174
cache-from : type=gha
174
175
cache-to : type=gha,mode=max
175
- tags : ${{ steps.ci_metadata.outputs.tags }}
176
- labels : ${{ steps.tag_metadata.outputs.labels }}
176
+ tags : ${{ steps.ci_metadata_std.outputs.tags }}
177
+ labels : ${{ steps.ci_metadata_std.outputs.labels }}
178
+ build-args : |
179
+ BUILD_PACKAGE_NAME=tyk-gateway
177
180
- name : Docker metadata for tag push
178
- id : tag_metadata
181
+ id : tag_metadata_std
179
182
uses : docker/metadata-action@v5
180
183
with :
181
184
images : |
182
- tykio/tyk-gateway
183
185
docker.tyk.io/tyk-gateway/tyk-gateway
186
+
187
+ tykio/tyk-gateway
184
188
flavor : |
185
189
latest=false
186
190
prefix=v
187
191
tags : |
188
192
type=semver,pattern={{major}}.{{minor}}
189
193
type=semver,pattern={{version}}
190
- labels : " org.opencontainers.image.title=tyk-gateway \n org.opencontainers.image.description=Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols\n org.opencontainers.image.vendor=tyk.io\n org.opencontainers.image.version=${{ github.ref_name }}\n "
191
- - name : push image to prod
194
+ labels : |
195
+ org.opencontainers.image.title=Tyk Gateway
196
+ org.opencontainers.image.description=Tyk Open Source API Gateway written in Go, supporting REST, GraphQL, TCP and gRPC protocols
197
+ org.opencontainers.image.vendor=tyk.io
198
+ org.opencontainers.image.version=${{ github.ref_name }}
199
+ - name : push std image to prod
192
200
if : ${{ matrix.golang_cross == '1.16' }}
193
201
uses : docker/build-push-action@v6
194
202
with :
195
203
context : " dist"
196
- platforms : linux/amd64,linux/arm64
204
+ platforms : linux/amd64,linux/arm64,linux/s390x
197
205
file : ci/Dockerfile.std
198
206
provenance : mode=max
199
207
sbom : true
200
208
cache-from : type=gha
201
209
cache-to : type=gha,mode=max
202
210
push : ${{ startsWith(github.ref, 'refs/tags') }}
203
- tags : ${{ steps.tag_metadata.outputs.tags }}
204
- labels : ${{ steps.tag_metadata.outputs.labels }}
211
+ tags : ${{ steps.tag_metadata_std.outputs.tags }}
212
+ labels : ${{ steps.tag_metadata_std.outputs.labels }}
213
+ build-args : |
214
+ BUILD_PACKAGE_NAME=tyk-gateway
205
215
- name : save deb
206
216
uses : actions/upload-artifact@v4
207
217
if : ${{ matrix.golang_cross == '1.16' }}
@@ -285,7 +295,7 @@ jobs:
285
295
env :
286
296
GH_TOKEN : ${{ github.token }}
287
297
run : |
288
- gh release download --repo github.com/tyklabs /tyk-pro --archive tar.gz -O env.tgz
298
+ gh release download --repo github.com/TykTechnologies /tyk-pro --archive tar.gz -O env.tgz
289
299
mkdir auto && tar --strip-components=1 -C auto -xzvf env.tgz
290
300
- name : env up
291
301
shell : bash
@@ -298,10 +308,11 @@ jobs:
298
308
TYK_MDCB_LICENSE : ${{ secrets.MDCB_LICENSE }}
299
309
run : |
300
310
match_tag=${{steps.ecr.outputs.registry}}/tyk:$BASE_REF
301
- tags=(${{ needs.goreleaser.outputs.tags }})
311
+ tags=(${{ needs.goreleaser.outputs.ee_tags }})
302
312
set -eaxo pipefail
303
313
docker run -q --rm -v ~/.docker/config.json:/root/.docker/config.json tykio/gromit policy match ${tags[0]} ${match_tag} 2>versions.env
304
314
echo '# alfa and beta have to come after the override
315
+
305
316
tyk_alfa_image=$tyk_image
306
317
tyk_beta_image=$tyk_image
307
318
ECR=${{steps.ecr.outputs.registry}}
@@ -359,7 +370,7 @@ jobs:
359
370
- uses : actions/setup-python@v5
360
371
with :
361
372
cache : ' pip'
362
- python-version : ' 3.11 '
373
+ python-version : ' 3.10 '
363
374
- name : Run API tests
364
375
id : test_execution
365
376
working-directory : tyk-analytics/tests/api
@@ -503,9 +514,11 @@ jobs:
503
514
load : true
504
515
- name : Test the built container image with api functionality test.
505
516
run : |
506
- docker run -d -p8080:8080 --network ${{ job.container.network }} --rm test-${{ matrix.distro }}-${{ matrix.arch }}
517
+ docker run -d -p8080:8080 --name=test --platform linux/${{ matrix.arch }} -- network ${{ job.container.network }} --rm test-${{ matrix.distro }}-${{ matrix.arch }}
507
518
sleep 2
508
519
./ci/tests/api-functionality/api_test.sh
520
+ sleep 2
521
+ docker stop test || true
509
522
upgrade-rpm :
510
523
services :
511
524
httpbin.org :
@@ -560,7 +573,7 @@ jobs:
560
573
tags : test-${{ matrix.distro }}-${{ matrix.arch }}
561
574
load : true
562
575
- name : Test the built container image with api functionality test.
563
- run : " docker run -d -p8080:8080 --network ${{ job.container.network }} --rm test-${{ matrix.distro }}-${{ matrix.arch }}\n sleep 2\n ./ci/tests/api-functionality/api_test.sh \n "
576
+ run : " docker run -d -p8080:8080 --name=test --platform linux/${{ matrix.arch }} -- network ${{ job.container.network }} --rm test-${{ matrix.distro }}-${{ matrix.arch }}\n sleep 2\n ./ci/tests/api-functionality/api_test.sh\n sleep 2 \n docker stop test || true \n "
564
577
sbom :
565
578
needs : goreleaser
566
579
uses : TykTechnologies/github-actions/.github/workflows/sbom.yaml@main
0 commit comments