Skip to content

Commit eff3459

Browse files
Add s390x support (#198)
* Add s390x Support Signed-off-by: Vishnu Bijukumar <vishnubijukumar@ibm.com> * Add s390x Support(Update go base-image version) Signed-off-by: Vishnu Bijukumar <vishnubijukumar@ibm.com> * Add s390x Support(Update go base-image version) Signed-off-by: Vishnu Bijukumar <vishnubijukumar@ibm.com> * Update .github/workflows/pr.yml Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> --------- Signed-off-by: Vishnu Bijukumar <vishnubijukumar@ibm.com> Signed-off-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es> Co-authored-by: Jorge Turrado Ferrero <Jorge_turrado@hotmail.es>
1 parent ed969ab commit eff3459

File tree

4 files changed

+33
-11
lines changed

4 files changed

+33
-11
lines changed

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
name: arm64
3232
- runner: ubuntu-latest
3333
name: amd64
34+
- runner: s390x
35+
name: s390x
3436
steps:
3537
- uses: actions/checkout@v3
3638

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ IMAGE_REPO ?= kedacore
66
IMAGE_KEDA_TOOLS ?= $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda-tools:$(KEDA_TOOLS_GO_VERSION)
77
IMAGE_KEDA_K6_RUNNER ?= $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda-k6-runner
88

9-
BUILD_PLATFORMS ?= linux/amd64,linux/arm64
9+
BUILD_PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x
1010

1111
IMAGE_TAG := $(shell git describe --always --abbrev=7)
1212

k6-runner/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=${BUILDPLATFORM} golang:1.21-alpine3.18 as builder
1+
FROM --platform=${BUILDPLATFORM} golang:1.22.12-alpine3.21 as builder
22
WORKDIR $GOPATH/src/go.k6.io/k6
33
RUN apk --no-cache add git
44

tools/Dockerfile

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:22.04
22

33
# Install prerequisite
44
RUN apt update && \
@@ -57,16 +57,36 @@ ENV GOROOT=/usr/local/go
5757
ENV GOPATH=/go
5858
ENV PATH=${PATH}:${GOPATH}/bin
5959

60-
# Install gh
61-
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
62-
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
63-
apt update && \
64-
apt install -y gh
60+
# Install GitHub CLI (gh)
61+
RUN ARCH=$(dpkg --print-architecture) && \
62+
case "$ARCH" in \
63+
"amd64" | "arm64") \
64+
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
65+
echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null && \
66+
apt update && \
67+
apt install -y gh \
68+
;; \
69+
"s390x") \
70+
echo "deb http://ports.ubuntu.com/ubuntu-ports jammy universe" | tee /etc/apt/sources.list.d/gh.list > /dev/null && \
71+
apt update && apt install -y gh \
72+
;; \
73+
*) \
74+
echo "Unsupported architecture: $ARCH" && exit 1 \
75+
;; \
76+
esac
6577

6678
# Protocol Buffer Compiler
79+
6780
RUN PROTOC_VERSION=21.9 \
68-
&& if [ $(dpkg --print-architecture) = "amd64" ]; then PROTOC_ARCH="x86_64"; else PROTOC_ARCH="aarch_64" ; fi \
69-
&& curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-$PROTOC_ARCH.zip" \
70-
&& unzip "protoc-${PROTOC_VERSION}-linux-$PROTOC_ARCH.zip" -d $HOME/.local \
81+
&& case $(dpkg --print-architecture) in \
82+
"amd64") PROTOC_ARCH="x86_64" ;; \
83+
"arm64") PROTOC_ARCH="aarch_64" ;; \
84+
"s390x") PROTOC_ARCH="s390_64" ;; \
85+
*) echo "Unsupported architecture"; exit 1 ;; \
86+
esac \
87+
&& curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip" \
88+
&& unzip "protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip" -d $HOME/.local \
7189
&& mv $HOME/.local/bin/protoc /usr/local/bin/protoc \
7290
&& mv $HOME/.local/include/ /usr/local/bin/include/
91+
92+

0 commit comments

Comments
 (0)