Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
739efb4
Add s390x architecture
buger Feb 15, 2023
885009a
Update Dockerfile.std
buger Feb 28, 2023
cfd3e0c
Update Dockerfile.std
buger Feb 28, 2023
c02d2c1
Create Dockerfile.no_python
buger Mar 1, 2023
a96937b
Update Dockerfile.std
buger Mar 1, 2023
fddc1ee
Update release.yml
buger Mar 1, 2023
74bf392
Update Dockerfile.std
buger Mar 1, 2023
fec30e3
Update release.yml
buger Mar 1, 2023
c651384
Update Dockerfile.std
buger Mar 1, 2023
275e27a
Update Dockerfile.std
buger Mar 1, 2023
574b8c7
Update Dockerfile.std
buger Mar 1, 2023
0a76b8c
Update Dockerfile.std
buger Mar 1, 2023
bc8cf19
Delete Dockerfile.no_python
buger Mar 1, 2023
c428373
Update goreleaser.yml
buger Mar 1, 2023
5ccc848
Update Dockerfile.std
buger Mar 1, 2023
dae9a25
Update goreleaser.yml
buger Mar 1, 2023
83adc5c
Update goreleaser.yml
buger Mar 1, 2023
ef977e0
Update goreleaser.yml
buger Mar 1, 2023
5c28ff7
Update Dockerfile.std
buger Mar 1, 2023
ba40d3f
Update Dockerfile.std
buger Mar 1, 2023
2dd926b
Update goreleaser.yml
buger Mar 1, 2023
3ae94d5
Update goreleaser.yml
buger Mar 1, 2023
297613d
Update goreleaser.yml
buger Mar 1, 2023
874ed35
Update goreleaser.yml
buger Mar 1, 2023
b6d03fb
Update goreleaser.yml
buger Mar 1, 2023
8140664
Update release.yml
buger Mar 14, 2023
bcf5b0f
Update Dockerfile.std
buger Mar 14, 2023
713c6ef
Update Dockerfile.std
buger Mar 14, 2023
0c7ef0b
Update goreleaser.yml
buger Mar 14, 2023
c91374d
Update goreleaser.yml
buger Mar 30, 2023
4b94baa
Update release.yml
buger Mar 30, 2023
9a79d36
Update release.yml
buger Mar 31, 2023
c709bde
Update release.yml
buger Mar 31, 2023
6e6b9d3
Update release.yml
buger Mar 31, 2023
249b68e
Merge branch 'master' into feature/s390x-arch
buger Mar 31, 2023
c2d6713
Update goreleaser.yml
buger Mar 31, 2023
1cf8135
Update release.yml
buger Apr 27, 2023
af307a5
Merge branch 'master' into feature/s390x-arch
buger Apr 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ jobs:
strategy:
fail-fast: false
matrix:
golang_cross: [ 1.19-bullseye ]
golang_cross: [ 1.19-ibm ]
include:
- golang_cross: 1.19-bullseye
- golang_cross: 1.19-ibm
goreleaser: 'ci/goreleaser/goreleaser.yml'
rpmvers: 'el/8 el/9'
debvers: 'ubuntu/bionic ubuntu/focal ubuntu/jammy debian/buster debian/bullseye'
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
push: true
context: "."
file: ci/Dockerfile.std
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
tags: |
${{ steps.login-ecr.outputs.registry }}/tyk:${{ needs.goreleaser.outputs.tag }}
${{ steps.login-ecr.outputs.registry }}/tyk:${{ github.sha }}
Expand Down Expand Up @@ -233,6 +233,8 @@ jobs:
arch:
- amd64
- arm64
- s390x
- ppc64le
distro:
- ubuntu:bionic
- ubuntu:focal
Expand Down
14 changes: 10 additions & 4 deletions ci/Dockerfile.std
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@

FROM debian:bullseye-slim
ARG TARGETARCH
ARG TARGETPLATFORM

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update \
&& apt-get dist-upgrade -y ca-certificates

# Install curl and python3
RUN apt-get install -y curl python3-setuptools libpython3.9 python3.9-dev \
&& curl https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install --only-binary ":all:" grpcio protobuf==3.20.1
RUN if [ "$TARGETPLATFORM" != "linux/s390x" && "$TARGETPLATFORM" != "linux/ppc64le" ]; then \
apt-get install -y curl python3-setuptools libpython3.9 python3.9-dev \
&& curl https://bootstrap.pypa.io/get-pip.py | python3 \
&& pip3 install --only-binary ":all:" grpcio protobuf==3.20.1 \
; fi


# Remove some things to decrease CVE surface
Expand All @@ -27,7 +31,9 @@ RUN rm -rf /root/.cache \
&& find /usr/lib -type f -name '*.a' -delete \
&& find /usr/lib -type f -name '*.o' -delete
# Print included pip/python versions
RUN pip3 --version && python3 --version
RUN if [ "$TARGETPLATFORM" != "linux/s390x" && "$TARGETPLATFORM" != "linux/ppc64le" ]; then \
pip3 --version && python3 --version \
; fi

# Comment this to test in dev
COPY *${TARGETARCH}.deb /
Expand Down
91 changes: 91 additions & 0 deletions ci/goreleaser/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,33 @@ builds:
goarch:
- arm64
binary: tyk
- id: std-s390x
flags:
- -tags=goplugin
ldflags:
- -X github.com/TykTechnologies/tyk/gateway.VERSION={{.Version}} -X github.com/TykTechnologies/tyk/gateway.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk/gateway.buildDate={{.Date}} -X github.com/TykTechnologies/tyk/gateway.builtBy=goreleaser
env:
- CC=s390x-linux-gnu-gcc
- CGO_ENABLED=1
goos:
- linux
goarch:
- s390x
binary: tyk
- id: std-ppc64le
flags:
- -tags=goplugin
ldflags:
- -X github.com/TykTechnologies/tyk/gateway.VERSION={{.Version}} -X github.com/TykTechnologies/tyk/gateway.Commit={{.FullCommit}} -X github.com/TykTechnologies/tyk/gateway.buildDate={{.Date}} -X github.com/TykTechnologies/tyk/gateway.builtBy=goreleaser
env:
- CC=powerpc64le-linux-gnu-gcc
- CGO_ENABLED=1
goos:
- linux
goarch:
- ppc64le
binary: tyk


dockers:
# Build tykio/tyk-gateway, docker.tyk.io/tyk-gateway/tyk-gateway (amd64)
Expand Down Expand Up @@ -104,6 +131,62 @@ dockers:
- "policies"
- "coprocess"
- "tyk.conf.example"

- ids:
- std
image_templates:
- "tykio/tyk-gateway:{{ .Tag }}-s390x"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use the manifest infra under docker_manifests section for DX.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- "docker.tyk.io/tyk-gateway/tyk-gateway:{{ .Tag }}-s390x"
build_flag_templates:
- "--build-arg=PORTS=8080"
- "--platform=linux/s390x"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
use: buildx
goarch: s390x
goos: linux
dockerfile: ci/Dockerfile.std
extra_files:
- "ci/install/"
- "README.md"
- "LICENSE.md"
- "apps/app_sample.json"
- "templates"
- "middleware"
- "event_handlers/sample"
- "policies"
- "coprocess"
- "tyk.conf.example"

- ids:
- std
image_templates:
- "tykio/tyk-gateway:{{ .Tag }}-ppc64le"
- "docker.tyk.io/tyk-gateway/tyk-gateway:{{ .Tag }}-ppc64le"
build_flag_templates:
- "--build-arg=PORTS=8080"
- "--platform=linux/ppc64le"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
use: buildx
goarch: ppc64le
goos: linux
dockerfile: ci/Dockerfile.std
extra_files:
- "ci/install/"
- "README.md"
- "LICENSE.md"
- "apps/app_sample.json"
- "templates"
- "middleware"
- "event_handlers/sample"
- "policies"
- "coprocess"
- "tyk.conf.example"

# Build gateway hybrid container arm64
- ids:
Expand Down Expand Up @@ -173,10 +256,14 @@ docker_manifests:
image_templates:
- tykio/tyk-gateway:{{ .Tag }}-amd64
- tykio/tyk-gateway:{{ .Tag }}-arm64
- tykio/tyk-gateway:{{ .Tag }}-s390x
- tykio/tyk-gateway:{{ .Tag }}-ppc64le
- name_template: tykio/tyk-gateway:v{{ .Major }}.{{ .Minor }}{{.Prerelease}}
image_templates:
- tykio/tyk-gateway:{{ .Tag }}-amd64
- tykio/tyk-gateway:{{ .Tag }}-arm64
- tykio/tyk-gateway:{{ .Tag }}-s390x
- tykio/tyk-gateway:{{ .Tag }}-ppc64le
- name_template: tykio/tyk-hybrid-docker:{{ .Tag }}
image_templates:
- tykio/tyk-hybrid-docker:{{ .Tag }}-amd64
Expand All @@ -192,6 +279,8 @@ nfpms:
builds:
- std-linux
- std-arm64
- std-s390x
- std-ppc64le
formats:
- deb
- rpm
Expand Down Expand Up @@ -238,6 +327,8 @@ nfpms:
amd64: x86_64
arm: aarch64
arm64: aarch64
s390x: s390x
ppc64le: ppc64le
deb:
file_name_template: '{{ .PackageName }}_{{ replace .Version "-" "~" }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}{{ if .Mips }}_{{ .Mips }}{{ end }}'
replacements:
Expand Down