-
Notifications
You must be signed in to change notification settings - Fork 98
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
Automate releases #334
Automate releases #334
Conversation
@somaritane keen to release UPD: ok, too late :D |
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.
Looks super fancy, just some clarifications required
.goreleaser.yml
Outdated
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' |
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 exclude them?
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 is upstream behaviour and ignored by providing --release-notes flag, https://goreleaser.com/customization/release/#custom-release-notes
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 it, just don't think we should exclude docs or tests from the changelog :)
docker_manifests: | ||
- name_template: absaoss/k8gb:{{ .Tag }} | ||
image_templates: | ||
- absaoss/k8gb:{{ .Tag }}-amd64 |
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.
Will the final tag include $arch
suffix?
If yes, it will break this logic https://github.com/AbsaOSS/k8gb/blob/master/chart/k8gb/templates/operator.yaml#L29
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 follows same strategy as of now. We build two images imag-{.Arch} then wrap it with single manifest name_template: absaoss/k8gb:{{ .Tag }}
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.
So it won't break Deployment
manifest. absaoss/k8gb:{{ .Tag }} will resolve into absaoss/k8gb:{{ .Tag }}-amd64 if kubernetes worker is amd64
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.
Cool!
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" |
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.
Can you elaborate on the logic 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.
you can run goreleaser --snapshot, it will build image: image:tag-next
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 wrong on publish: https://goreleaser.com/customization/snapshots/#how-it-works
@ytsarev, Oops, I've just released |
@k0da will it create Draft Release or Release right away? |
If set to true, will not auto-publish the release.Default is false.draft: falseRelease straighaway. I think we should start with draft first |
Makes sense. |
amended |
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.
@k0da what about we create some fake releases and see how it works end-to-end?
.goreleaser.yml
Outdated
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
changelog: | ||
sort: asc |
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.
is it about goreleaser based changelog? Will it be completely overriden by github_changelog_genererator? If yes we probably can omit this option
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, I'll drop it.
I can tag local commit with v0.7.7-alpha1 and run releaser manually? |
d65ae3a
to
7d519e9
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.
https://github.com/AbsaOSS/k8gb/releases/tag/untagged-d1d7bd1b09241abe6eb0 looks great, so let's accommodate the cool pipes :)
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
@@ -109,3 +109,6 @@ chart/k8gb/charts/*.tgz | |||
|
|||
# Ignore testing kubeconfigs | |||
kubeconfig* | |||
|
|||
# Ignore changes from github_changelog_generator action | |||
changes |
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.
How do we update CHANGELOG.md
in this scenario?
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.
same way as before, post release commit (post release github_changelog_generator on maintainers machine and open PR).
During GH run only temporary diff is generated into gitingored file.
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 before local github_changelog_generator diff was the input for release. Now it will be required to run it locally post release and commit? It might lead to deviations
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.
If I look at last v0.7.6 release, offline changelog was commited at 18:00, and release was done on 15:06. I see no deviation.
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.
yeas, because offline changelog is the source for release text
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.
Is it worth to sacrafice automation in order to have "offline" change log?
you have two tags, and tool to work with those tags. ATM we run tool get output and paste it into "Release".
I propose to run tool as part of release draft pipeline to format a release. Then run tool with same input to commit post release offline changelog. Sorry I only see an improvement here.
Additionally draft can be changed the same way from "offline" changelog.
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 am not talking about sticking to current scenario, more thinking of avoiding pitfalls with the new one. Can we write to CHANGELOG.md in post-release pipeline and commit it automatically?
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 option can be explored for sure.
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.
@ytsarev ammended
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.
@k0da very cool, thanks!
037ec14
to
88641c8
Compare
.github/workflows/helm_publish.yaml
Outdated
publish: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v1 |
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.
Please switch to v2
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
so I tested pull-request action here https://github.com/k0da/terraform-controller/runs/2020895388?check_suite_focus=true |
IMO any way automated PR can be closed any time. So this is quite harmless improvement |
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
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, can't wait for new release :)🤞
* Adds separate Dockerfile for each architecture to keep base image unchanged. * Brings github_changelog_generator into a release pipeline * Add .goreleaser.yaml with go build and amd64/arm64 images with docker common manifest * Introduce pipeline for tag event, where docker artifacts will be built. * Rename helm pipeline (release) into helm_publish * Opens pull-request with offline changelog (CHANGELOG.md) update Signed-off-by: Dinar Valeev <dinar.valeev@absa.africa>
@somaritane @ytsarev I've ammended fetch-depth param to checkout action to preserve full history for github_changelog_generator |
Signed-off-by: Dinar Valeev dinar.valeev@absa.africa