-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ARM images #332
fix: ARM images #332
Conversation
Signed-off-by: Mateus Oliveira <[email protected]>
Skipping CI for Draft Pull Request. |
Signed-off-by: Mateus Oliveira <[email protected]>
@mateusoliveira43: all tests passed! Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
@@ -1,10 +1,16 @@ | |||
FROM quay.io/konveyor/builder:latest AS builder | |||
FROM quay.io/konveyor/builder:ubi9-latest AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM quay.io/konveyor/builder:ubi9-latest AS builder | |
FROM --platform=$BUILDPLATFORM quay.io/konveyor/builder:ubi9-latest AS builder | |
ARG BUILDPLATFORM |
Since we are optimizing, and golang can cross compile binary, and this is not the final stage, we can set BUILDPLATFORM to get more optimum performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this would make only multi platform builds faster, not?
since multi platform builds are CI responsibility (and I do not know how PROW does it), I think we do not need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right do not need. but doesn't hurt to add for local dev builds either when building for dev/customers who are on arch other than the dev machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im on arm, so this would speed up builds of amd64 images to use on amd64 cluster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would make single platform build faster if the OS building (ie. laptop is arm64) is different than intended image platform (for amd64 cluster)
@@ -1,18 +1,29 @@ | |||
# TODO! Find a real ubi8 image for golang 1.16 | |||
FROM quay.io/konveyor/builder:ubi9-latest AS builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM quay.io/konveyor/builder:ubi9-latest AS builder | |
FROM --platform=$BUILDPLATFORM quay.io/konveyor/builder:ubi9-latest AS builder | |
ARG BUILDPLATFORM |
RUN CGO_ENABLED=0 GOOS=linux go build -a -mod=mod -ldflags '-extldflags "-static"' -o /go/src/velero-helper github.com/vmware-tanzu/velero/cmd/velero-helper | ||
|
||
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -mod=mod -ldflags '-extldflags "-static" -X github.com/vmware-tanzu/velero/pkg/buildinfo.Version=konveyor-dev' -o /go/src/velero github.com/vmware-tanzu/velero/cmd/velero | ||
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -mod=mod -ldflags '-extldflags "-static"' -o /go/src/velero-helper github.com/vmware-tanzu/velero/cmd/velero-helper | ||
|
||
FROM quay.io/konveyor/builder:ubi9-latest AS restic-builder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FROM quay.io/konveyor/builder:ubi9-latest AS restic-builder | |
FROM --platform=$BUILDPLATFORM quay.io/konveyor/builder:ubi9-latest AS restic-builder | |
ARG BUILDPLATFORM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/LGTM
/cherry-pick oadp-1.4 |
@mateusoliveira43: once the present PR merges, I will cherry-pick it on top of oadp-1.4 in a new PR and assign it to you. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: kaovilai, mateusoliveira43, weshayutin The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
41ad312
into
openshift:konveyor-dev
@mateusoliveira43: #332 failed to apply on top of branch "oadp-1.4":
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
* fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> * fixup! fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> --------- Signed-off-by: Mateus Oliveira <[email protected]> (cherry picked from commit 41ad312)
* fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> * fixup! fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> --------- Signed-off-by: Mateus Oliveira <[email protected]> (cherry picked from commit 41ad312)
* fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> * fixup! fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> --------- Signed-off-by: Mateus Oliveira <[email protected]>
* fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> * fixup! fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> --------- Signed-off-by: Mateus Oliveira <[email protected]>
* fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> * fixup! fix: ARM images Signed-off-by: Mateus Oliveira <[email protected]> --------- Signed-off-by: Mateus Oliveira <[email protected]>
Add ARM images to PROW CI
Example image: https://quay.io/repository/msouzaol/velero
Related to openshift/release#54877
How to build