-
Notifications
You must be signed in to change notification settings - Fork 13
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
multiarch: Build multiarch binaries and images #24
Conversation
aec0df7
to
3416968
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #24 +/- ##
==========================================
+ Coverage 26.36% 27.04% +0.67%
==========================================
Files 75 75
Lines 5112 6083 +971
==========================================
+ Hits 1348 1645 +297
- Misses 3600 4274 +674
Partials 164 164
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
7e6816f
to
a341411
Compare
1d790c8
to
fa94e4f
Compare
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, but @astoycos has been following this more closely than me, so I'll let him do the final approval.
with: | ||
files: ./cover.out | ||
flags: unittests | ||
fail_ci_if_error: false |
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.
Thanks for breaking this out.
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64, linux/arm64, linux/ppc64le, linux/s390x | ||
push: ${{ fromJSON(steps.set-push.outputs.push_flag) }} |
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.
hrm why the fromJSON() function call here?
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 would think just steps.set-push.outputs.push_flag would work
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.
Needed to convert from the string "true" to a boolean true/false. It balked at just passing steps.set-push.outputs.push_flag.
@@ -95,21 +162,10 @@ jobs: | |||
images: ${{ matrix.image.registry }}/${{ matrix.image.repository }}/${{ matrix.image.image }} | |||
tags: ${{ matrix.image.tags }} | |||
|
|||
- name: Build image |
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.
Wait are we still actually building the bundle image anywhere?
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.
Yes, it's in it's own job, line 132 (https://github.com/bpfman/bpfman-operator/pull/24/files#diff-502adaf7a495a56eb3ecef9c7f4c295ce0ac343f9b0d4e2fd321910fdf8f58bdR132). I was on the fence on one job or two. There are a handful of common steps (Checkout bpfman, Install Golang, etc), but several that are specific to bundle (Generate olm bundle on disk, Push to registry) and even more in the Build Image job that don't need to run.
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 get that it's in it's own job now and that's alright since we don't have to build it for every different platform, however in the
name: Build Bundle Image (${{ matrix.image.image }}) |
make bundle
just makes sure all the manifests for the bundle are generated
.github/workflows/image-build.yaml
Outdated
|
||
- name: Generate olm bundle on disk | ||
if: ${{ matrix.image.image == 'bpfman-operator-bundle' }} | ||
run: | | ||
make bundle |
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 needs to be make bundle-build
to actually build the bundle image. Since the manifests in https://github.com/bpfman/bpfman-operator/tree/main/bundle should always be up to date now
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.
Done
.github/workflows/image-build.yaml
Outdated
|
||
- uses: actions/setup-go@v5 | ||
- name: Install Golang |
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 don't think we'll even need this for just make bundle-build
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.
Removed
94b3890
to
45fc3fa
Compare
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.
Thanks @Billy99!
Since bpfman-operator is moving to it's own repo, no longer build and push the bpfman-operator and bpfman-agent from the bpfman repo, but instead, build and push from the bpfman-operator repo. Rework the Makefile such that it no longer loops through each architecture. Building all architectures is done in github actions. The Makefile still allows local cross compiling for a single architecture, just not all architectures in one command. This simplifies the Makefile. Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
use valid sha images for components nudding after components renaming
Since bpfman-operator is moving to it's own repo, no longer build and push the bpfman-operator and bpfman-agent from the bpfman repo, but instead, build and push from the bpfman-operator repo.
Rework the Makefile such that it no longer loops through each architecture. Building all architectures is done in github actions. The Makefile still allows local cross compiling for a single architecture, just not all architectures in one command. This simplifies the Makefile and yaml files loading images don't need
-amd64
appended anywhere.