Skip to content

Commit 3598de3

Browse files
authored
Enable ppc64le build for test-tools (#231)
* change added to enable ppc64le build Signed-off-by: kabhiibm <kumar.abhishek2@ibm.com> Signed-off-by: Kumar-Abhishek <kumar.abhishek2@ibm.com> * ppc64le test gha change added Signed-off-by: Kumar-Abhishek <kumar.abhishek2@ibm.com> --------- Signed-off-by: kabhiibm <kumar.abhishek2@ibm.com> Signed-off-by: Kumar-Abhishek <kumar.abhishek2@ibm.com>
1 parent 497a577 commit 3598de3

3 files changed

Lines changed: 28 additions & 6 deletions

File tree

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ jobs:
4545
name: amd64
4646
- runner: s390x
4747
name: s390x
48+
- runner: ppc64le
49+
name: ppc64le
4850
steps:
4951
- uses: actions/checkout@v3
5052

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,linux/s390x
9+
BUILD_PLATFORMS ?= linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
1010

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

tools/Dockerfile

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,32 @@ RUN apt-get install -y apt-transport-https ca-certificates curl gnupg-agent soft
2222

2323
# Install golang
2424
ARG GO_VERSION
25-
RUN curl -LO https://golang.org/dl/go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz && \
25+
RUN ARCH=$(dpkg --print-architecture) && \
26+
case "$ARCH" in \
27+
"ppc64le" | "ppc64el") \
28+
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-ppc64le.tar.gz && \
29+
tar -C /usr/local -xvzf go${GO_VERSION}.linux-ppc64le.tar.gz && \
30+
rm -rf go${GO_VERSION}.linux-ppc64le.tar.gz \
31+
;; \
32+
*) \
33+
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz && \
2634
tar -C /usr/local -xvzf go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz && \
27-
rm -rf go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz
35+
rm -rf go${GO_VERSION}.linux-$(dpkg --print-architecture).tar.gz \
36+
;; \
37+
esac
2838

2939
# Install kubectl
30-
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl" && \
31-
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl.sha256" && \
40+
RUN ARCH=$(dpkg --print-architecture) && \
41+
case "$ARCH" in \
42+
"ppc64le" | "ppc64el") \
43+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/ppc64le/kubectl" && \
44+
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/ppc64le/kubectl.sha256" \
45+
;; \
46+
*) \
47+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl" && \
48+
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/$(dpkg --print-architecture)/kubectl.sha256" \
49+
;; \
50+
esac && \
3251
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check && \
3352
chmod +x ./kubectl && mv ./kubectl /usr/bin/kubectl && \
3453
rm kubectl.sha256
@@ -63,7 +82,7 @@ RUN ARCH=$(dpkg --print-architecture) && \
6382
apt update && \
6483
apt install -y gh \
6584
;; \
66-
"s390x") \
85+
"s390x" | "ppc64el" | "ppc64le") \
6786
echo "deb http://ports.ubuntu.com/ubuntu-ports jammy universe" | tee /etc/apt/sources.list.d/gh.list > /dev/null && \
6887
apt update && apt install -y gh \
6988
;; \
@@ -79,6 +98,7 @@ RUN PROTOC_VERSION=21.9 \
7998
"amd64") PROTOC_ARCH="x86_64" ;; \
8099
"arm64") PROTOC_ARCH="aarch_64" ;; \
81100
"s390x") PROTOC_ARCH="s390_64" ;; \
101+
"ppc64el" | "ppc64le") PROTOC_ARCH="ppcle_64" ;; \
82102
*) echo "Unsupported architecture"; exit 1 ;; \
83103
esac \
84104
&& curl -LO "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip" \

0 commit comments

Comments
 (0)