Skip to content
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

WIP: Send dispatch event to buildpacks/samples on lifecycle release #1010

Closed
wants to merge 4 commits into from

Conversation

glokta1
Copy link

@glokta1 glokta1 commented Feb 14, 2023

Adds workflow to send dispatch event to buildpacks/samples on lifecycle releases. This will be used as a trigger on the receiving end to rebuild the samples and update their builder.toml files with the latest lifecycle version.

Lifecycle version is sent in dispatch payload.

Resolves #801

Question: Am I correct in thinking the activity type of release should be released and not published? I took it from the post-release.yml file but I presume we want to send the dispatch event only for (stable) releases, not pre-releases or draft releases?

@glokta1 glokta1 requested a review from a team as a code owner February 14, 2023 17:57
The workflow will trigger on published releases of lifecycle. Samples will be rebuilt on receiving dispatch events and updated with the latest lifecycle version. See buildpacks#801

Signed-off-by: glokta1 <rafeyahmad@protonmail.com>
Signed-off-by: glokta1 <rafeyahmad@protonmail.com>
on:
release:
types:
- published
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I do think we want this to be released

@natalieparellano
Copy link
Member

Thanks for the PR @glokta1! I'll test this out on my fork...

Copy link
Member

@natalieparellano natalieparellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glokta1 thanks for this! I added a couple of suggestions.

glokta1 and others added 2 commits February 17, 2023 23:15
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Rafey Ahmad <71697384+glokta1@users.noreply.github.com>
Co-authored-by: Natalie Arellano <narellano@vmware.com>
Signed-off-by: Rafey Ahmad <71697384+glokta1@users.noreply.github.com>
@natalieparellano
Copy link
Member

Looks good to me! @jabrown85 WDYT?

@natalieparellano
Copy link
Member

@glokta1 apologies for letting this PR sit here - I think we were waiting for buildpacks/samples#138 to react to the dispatch before merging them together. It looks like buildpacks/samples#138 registers the event but doesn't actually update the builder.toml files or published images. Let us know if you intend on picking that back up, otherwise we might just close both PRs for now.

@glokta1
Copy link
Author

glokta1 commented Apr 2, 2023

Hey @natalieparellano, I should apologize for the lack of communication. I encountered some difficulties in setting up the test environment while writing the other workflow and left it at the time. I will pick it back up in a 2-3 days' time :)

@glokta1
Copy link
Author

glokta1 commented Apr 6, 2023

Sorry, something unexpectedly came up and I got too much on my plate right now :/. We can close these PR's for now if you want.

@natalieparellano
Copy link
Member

No worries, thanks a lot for your effort @glokta1 ❤️

@glokta1 glokta1 deleted the dispatch-release branch April 8, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add automation to re-generate sample builders when lifecycle is published
3 participants