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

make some release steps automatic #751

Open
xsalefter opened this issue May 25, 2023 · 4 comments
Open

make some release steps automatic #751

xsalefter opened this issue May 25, 2023 · 4 comments

Comments

@xsalefter
Copy link
Contributor

Currently, each Kill Bill repository has an automatic way of releasing itself (release.yml github workflow). What's time consuming is the ordering of releases that is necessary.

We're not expecting that we automate all of release process (what if there are failures in the middle or infinite loops...), but at least, for example: each time killbill-platform released, it automatically triggers a release of killbill-oss-parent with the new version of killbill-platform.

Some idea (from Pierre):

There is an event that can be triggered across repos: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch So one release could trigger (in theory) the next.

We also need to update via script the version of repo X in the killbill-oss-parent workflow (ideally the new version is sent in the repository_dispatch event and passed here:

description: 'New killbill-base-plugin version'
).

.... maybe there is another way of doing it... Like doing all releases from a "central" repo, just like the ci job is doing here: https://github.com/killbill/killbill-oss-parent/blob/125da2cf399802378cf1349bbd3afc9c24503927/.github/workflows/ci.yml

When working on this, we may need run github action locally.

@sbrossie
Copy link
Member

My concern with this task is when is the observability piece: How do we follow what is happening? How do we know how to resume when it does not work? How do we even know it's complete?

@xsalefter
Copy link
Contributor Author

I think the main idea of this task is especially to cut some manual process when releasing killbill-oss-parent once one of library version updated. Looking at our release process:

  1. Clone the desired branch of the killbill-commons repo.
    2. Update killbill-commons/pom.xml with the latest killbill-oss-parent version (generated at step 1.2 above).
    3. Wait for tests to be green.
    4. Release killbill-commons.
    5. Pull the latest killbill-oss-parent code.
    6. Update killbill-oss-parent/pom.xml with the latest killbill-commons version (generated at step 4 above).
    7. Release killbill-oss-parent.

The task is to automate point 4 to 7.

Of course, in point 3, test could be fails. But I think that's Ok, we fall back to doing 4-7 manually. And we only send repository_dispatch event only if release process successful.

@xsalefter
Copy link
Contributor Author

xsalefter commented Jul 26, 2023

This is done by creating workflow_dispatch (instead of repository_dispatch) when releasing repository. These are PRs for affected repositories:

According to the release documentation, I think I miss killbill-client-java to get update like 3 above. @pierre Should I create PR for killbill-client-java? What about killbill-api and killbill-plugin-api?

@pierre
Copy link
Member

pierre commented Jul 28, 2023

Yup, doing this on these 3 repos makes sense.

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

No branches or pull requests

3 participants