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

Add update version workflow #41

Closed

Conversation

xsalefter
Copy link
Contributor

@xsalefter xsalefter commented Jun 9, 2023

Original issue: killbill/killbill-oss-parent#751

POC: https://github.com/xsalefter/kb-oss-parent

  1. The update-version.yml is doing the same as what the POC done here.

  2. The update-version.yml then uses by release-repo-dispatch.yml file. In killbill project, this release-repo-dispatch.yml file will created in killbill-oss-parent project with the same name (PR created later).

  3. After update-version.yml executed successfully, release-repo-dispatch.yml will call ci.yml. In killbill project, release-repo-dispatch.yml will doing the same thing: calling its ci.yml file.

  4. Once ci.yml executed sucessfully, release-repo-dispatch.yml file will call release.yml. In killbill project, release-repo-dispatch.yml will doing the same thing: calling release.yml. Killbill's release.yml will have minor modification.

  5. The release-repo-dispatch.yml will be triggered by other repositories that sent a repository_dispatch event. killbill-commons is one of them.

Thus, when killbill-commons (or any other repositories) released successfully, then its version will getting updated in killbill-oss-parent, trigger CI, and then try to release the up-to-date killbill-oss-parent automatically.

Note: There's one commit that have nothing to do with original issue: adding .gitignore file for intellij files.

- name: Install XML Starlet
run: sudo apt-get install xmlstarlet
- name: Update ${{github.event.client_payload.property_name}} Property in pom.xml file
run: xmlstarlet ed --inplace -N x="http://maven.apache.org/POM/4.0.0" -u "//x:properties/x:${{github.event.client_payload.property_name}}" -v ${{github.event.client_payload.property_value}} pom.xml
Copy link
Member

Choose a reason for hiding this comment

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

Does it really work for the multi-module repo - e.g killbill-commons; Don't we need to update the pom.xml from all the children directory, e.g https://github.com/killbill/killbill-commons/blob/master/automaton/pom.xml#L25 ?

If this is the case, why not using mvn versions:set -DnewVersion=${{github.event.client_payload.property_value}} ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The purpose of this update-version.yml is to update and commit this /project/properties/<any> in pom.xml:

<project>
  <properties>
    <!-- this will be updated -->
    <killbill-commons.version>1.2.3</killbill-commons.version>
  </properties>
</project>

meanwhile, AFAIK mvn versions:set to actually update its/dependencies version.

Nevertheless, now I think this update-version.yml would never used outside of killbill-oss-parent repository 🤔 . Should I just remove this and put in killbill-oss-parent instead?

@xsalefter
Copy link
Contributor Author

Closed this PR as we don't need this.

@xsalefter xsalefter closed this Jul 11, 2023
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.

2 participants