Skip to content

Commit

Permalink
[release-v1.12] Add arm builds (knative#378)
Browse files Browse the repository at this point in the history
* [release-v1.12] Add arm builds

* [release-v1.12] Add arm builds on linux also
  • Loading branch information
dsimansk authored May 13, 2024
1 parent 0a5a361 commit 39c6851
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ RUN microdnf install -y zip tar gzip && \

FROM registry.ci.openshift.org/ocp/ubi-minimal:8
WORKDIR /opt/app-root/src/go/src/github.com/knative/client
RUN mkdir -p /usr/share/kn/{linux_amd64,linux_arm64,linux_ppc64le,linux_s390x,macos,windows}
RUN mkdir -p /usr/share/kn/{linux_amd64,linux_arm64,linux_ppc64le,linux_s390x,macos_amd64,macos_arm64,windows}

COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-amd64.tar.gz /usr/share/kn/linux_amd64/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-arm64.tar.gz /usr/share/kn/linux_arm64/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-ppc64le.tar.gz /usr/share/kn/linux_ppc64le/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-linux-s390x.tar.gz /usr/share/kn/linux_s390x/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-macos-amd64.tar.gz /usr/share/kn/macos/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-macos-amd64.tar.gz /usr/share/kn/macos_amd64/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-macos-arm64.tar.gz /usr/share/kn/macos_arm64/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/kn-windows-amd64.zip /usr/share/kn/windows/
COPY --from=packager /opt/app-root/src/go/src/github.com/knative/client/LICENSE /usr/share/kn/LICENSE
7 changes: 7 additions & 0 deletions package_cliartifacts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ pkg_tar() {
mv kn-darwin-amd64 ${OUTDIR}/${dir}/kn
chmod +x ${OUTDIR}/${dir}/kn
;;
macos-arm64)
dir=macos-arm64
mkdir "${OUTDIR}/${dir}"
mv kn-darwin-arm64 ${OUTDIR}/${dir}/kn
chmod +x ${OUTDIR}/${dir}/kn
;;
esac
cp LICENSE ${OUTDIR}/${dir}
tar -zcf kn-${dir}.tar.gz -C ${OUTDIR}/${dir} .
Expand All @@ -49,4 +55,5 @@ pkg_tar arm64
pkg_tar ppc64le
pkg_tar s390x
pkg_tar macos
pkg_tar macos-arm64
pkg_zip_for_windows

0 comments on commit 39c6851

Please sign in to comment.