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

feat: automation promote from staging to maven central #104

Conversation

davisusanibar
Copy link
Contributor

This PR contains:

  • Feature to implement automation promote from Staging to Maven Central after 14 days.
  • Feature to add a prefix to indicate what kind of release this pull request corresponds to (For reference, see https://www.conventionalcommits.org/)

Third part to solve #43 , please complete review/merge #102 that is needed by this PR

@davisusanibar
Copy link
Contributor Author

Please confirm if 14 days is enough to promote a package from Staging to Production (Maven Central).

@jacques-n
Copy link
Collaborator

I think this should happen instantly (as part of release). If we're doing automated releases, let's do automated releases...

@davisusanibar
Copy link
Contributor Author

I will see these scenarios/options:

1. Scenario / Option: Merge PR on main brach --> after 7 days --> Release to Staging --> after 0 days --> Release to Maven Central

Disadvantages:

  • We are offering Java artifacts to Maven Central without an internal test o window to someone could validate that.
  • We wont't be able to delete Java artifacts once it is released to Maven Central.

Changes needed:

  • Close this PR (doesn't needed)
  • Change publish code from publishToSonatype closeSonatypeStagingRepository to publishToSonatype closeAndReleaseSonatypeStagingRepository.

2. Scenario / Option: Merge PR on main brach --> after 0 days --> Release to Staging --> after 20 days --> Release to Maven Central

Advantage:

  • We could have the Java artifacts immediately ready on Staging environment after a PR is merged.
  • If needed, contributors could test Java artifacts on Staging environment.
  • We will be able to delete Java artifacts once it is released to Staging environment as needed.

Disadvantages:

  • We wont't be able to delete Java artifacts once it is released to Maven Central.

Changes needed:

  • Review/approve this PR (Proposal is to promote after 20 days, changes as needed)

@jacques-n
Copy link
Collaborator

@davisusanibar, I prefer the first scenario you outlined.

From my pov, the second scenario isn't really CD/automated releases. If we did want to do manual testing, I would expect that we would trigger the release directly after manual testing--not do manual testing and then wait a bunch more days before the code is released to others. I don't really see any benefit to a 20-day waiting period.

We are offering Java artifacts to Maven Central without an internal test

A major goal of automated releases is automated tests. We release when our tests say things are good. If the tests are failing, we shouldn't release.

@davisusanibar
Copy link
Contributor Author

Ok, I agree. Let me close this PR and send another to implement escenario 1.

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