-
Notifications
You must be signed in to change notification settings - Fork 27
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
Multi Arch Support for Devfile Index and Devfile Index Base #245
Conversation
Signed-off-by: Jordan Dubrick <[email protected]>
… update docs Signed-off-by: Jordan Dubrick <[email protected]>
Signed-off-by: Jordan Dubrick <[email protected]>
Signed-off-by: Jordan Dubrick <[email protected]>
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 tested locally all the scripts and they were ok. Left a minor comment regarding logging.
.github/workflows/ci.yaml
Outdated
@@ -110,7 +110,7 @@ jobs: | |||
cd index/server | |||
export GOPATH=$(go env GOPATH) | |||
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@${{ env.OAPI_CODEGEN_VERSION }} | |||
bash ./build.sh | |||
bash ./build.sh && bash ./build.sh linux/arm64 |
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.
I was wondering here how we could make it more explicit when something fails. Like, if it makes sense to add different steps per architecture OR maybe add some (kind-of) logging in the building script. This way when something fails we can see it quickly from the workflow logs.
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.
Out of scope for the PR but might be good to add the commands here in a script.
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.
Since this line is just testing to make sure the builds are working on a PR I can split it up so instead of them being combined they can each have their own setup? One for amd64 and one for arm64?
On the other hand with logging I can also try to alter the script to add some more logging into it, I will try both and see which one is more clear! I don't mind checking it out in this PR as I feel proper logging for the arch is part of the scope for this.
@Jdubrick Ive also read today this blog post. Not sure if it's something that we would like to use here https://github.blog/2024-06-03-arm64-on-github-actions-powering-faster-more-efficient-build-systems/ |
Signed-off-by: Jordan Dubrick <[email protected]>
Signed-off-by: Jordan Dubrick <[email protected]>
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jdubrick, maysunfaisal 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 |
Please specify the area for this PR
Building images for multiple architectures
What does does this PR do / why we need it:
This PR allows for the
devfile-index-base
image to be built for different architectures. A summary of the changes are:./build.sh
to take an optional argument that allows a user to build for a different architecture. The default islinux/amd64
.build-multi-arch.sh
which takes care of building and pushing a multi-arch image calleddevfile-index-base:next
to quay. This allows for users to pull fromquay.io/devfile/devfile-index-base:next
and it will provide them with the correct image for their arch.linux/amd64
andlinux/arm64
.pushimage-next.yaml
to utilize the newbuild-multi-arch.sh
script..ci/Dockerfile
to set the yq architecture to be consistent with the architecture being built, previously it was hardcoded toamd64
.Which issue(s) this PR fixes:
fixes devfile/api#1547
partially fixes devfile/api#1551
PR acceptance criteria:
Documentation (WIP)
How to test changes / Special notes to the reviewer: