Skip to content

Commit ec2c3aa

Browse files
committed
(feat): Support ARM builds
- Modify Dockerfile.konflux to support multi-arch - Add arm build config in pull-request pipeline
1 parent 75074ec commit ec2c3aa

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.tekton/odh-codeflare-operator-pull-request.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ spec:
4747
- name: build-platforms
4848
value:
4949
- linux/x86_64
50+
- linux-m2xlarge/arm64
5051
- name: image-expires-after
5152
value: 5d
5253
pipelineRef:

Dockerfile.konflux

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
FROM registry.access.redhat.com/ubi9/go-toolset:1.23@sha256:381fb72f087a07432520fa93364f66b5981557f1dd708f3c4692d6d0a76299b3 AS builder
22

3+
ARG TARGETOS
4+
ARG TARGETARCH
5+
36
WORKDIR /workspace
47

58
# Copy the Go Modules manifests
@@ -21,7 +24,7 @@ RUN git config --global --add safe.directory /workspace
2124
# Build
2225
USER root
2326

24-
RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GOEXPERIMENT=strictfipsruntime go build -tags strictfipsruntime -a -o manager main.go
27+
RUN CGO_ENABLED=1 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH:-amd64} GOEXPERIMENT=strictfipsruntime go build -tags strictfipsruntime -a -o manager main.go
2528

2629
FROM registry.redhat.io/ubi9/ubi-minimal@sha256:e6b39b0a2cd88c0d904552eee0dca461bc74fe86fda3648ca4f8150913c79d0f
2730
WORKDIR /
@@ -38,4 +41,4 @@ LABEL com.redhat.component="odh-codeflare-operator-container" \
3841
io.openshift.expose-services="" \
3942
io.k8s.display-name="odh-codeflare-operator-container" \
4043
io.k8s.description="odh-codeflare-operator" \
41-
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"
44+
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"

0 commit comments

Comments
 (0)