-
Notifications
You must be signed in to change notification settings - Fork 46
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
feat: add a ghcr.io container artifact for metal-cli releases #252
base: main
Are you sure you want to change the base?
Conversation
.goreleaser.yml
Outdated
- image_templates: | ||
- 'ghcr.io/{{ .Env.GITHUB_REPOSITORY }}:{{ .Tag }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}' | ||
dockerfile: Dockerfile | ||
use: buildx |
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.
It looks like there may be an alternative approach where goreleaser copies the binaries it built into images without needing a redundant buildx 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.
We can consider that in the future.
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.
It seems like it won't work without that functionality, actually. Working on converting 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.
Why Can't we use the same container for local building purposes, we observed a couple issue in golang version compatibility issue ?
b9b3a73
to
28eb1cb
Compare
Build failed when I tried this in my fork:
|
didn't see comment from marques about build failing
Needs fix for whatever build failure Marques hit. |
62114ff
to
4070896
Compare
6c4f983
to
e126d80
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.
Ok, i have configured the following:
- Use goreleaser's builtin ko functionality to build mutliplatform image for linux/amd64, linux/arm64, linux/arm/7
- Add opencontainer labels to the images
- Update the github action to login to the docker hub, ghcr.io, and quay.io registries
- Did a lot of testing with manual runs of goreleaser to validate syntax
Things that could still happen either in this PR or future PRs:
- Add a gomod section and leverage goreleaser's support to create a verifiable build
- use the built-in ko's functionality to create a SBOM for our images
- Configure docker manifest signing to sign the above SBOM
- Add windows images built on nanoserver (biggest barrier is a way to test them on our end as we all have Macs and no windows servers)
Things we need to do after accepting this PR
- Define the secrets referenced in the release.yml file, aka the quay.io and dockerhub logins. Similar formatting and naming as used in the cluster-api repository.
Signed-off-by: Marques Johansson <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
Signed-off-by: Chris Privitere <[email protected]>
64d8f0c
to
3e7b42c
Compare
fixes #122