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 daily release & change deploy plugin #1418

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

mocenas
Copy link
Contributor

@mocenas mocenas commented Nov 26, 2024

Summary

This is not a final PR. It is a proposal for GH action to daily release snapshots.

The GH action itself is pretty simple and should be OK - here is a success run

Problem is the nexus-staging-maven-plugin.

Thing is, we are releasing a maven plugin - quarkus-test-preparer. And plugins should be listed in org's maven-metadata.xml in the maven repo. For us, it should look like this:

<metadata>
  <plugins>
    <plugin>
      <name>Quarkus - Test Framework - Test preparer</name>
      <prefix>quarkus-qe</prefix>
      <artifactId>quarkus-test-preparer</artifactId>
    </plugin>
  </plugins>
</metadata>

Problem is, that nexus-staging-maven-plugin is ommiting the "prefix" attribute in deployment, which the same plugin treats as mandatory when reading the file. As a result, if we use nexus-staging-maven-plugin the first upload is going to be OK, but any consecutive upload is going to fail with:
Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.7.0:deploy (injected-nexus-deploy) on project <whatever>: Failed to update metadata io.quarkus.qe/maven-metadata.xml: Cannot invoke "String.equals(Object)" because the return value of "org.apache.maven.artifact.repository.metadata.Plugin.getPrefix()" is null -> [Help 1]
and the only way to fix this broken cycle is to manually log into the nexus and remove uploaded stuff.

This is known problem I found few issues about and it doesn't seem to be fixed in near future:

Only hint I found about how to solve this, is to use maven-deploy-plugin instead. Which I did and it works. But I'm not sure if we're using the nexus-staging-maven-plugin for some specific reason/features or not. Also I'm not yet sure how is this change going to affect normal releases. Of course there is the possibility to use nexus-staging-maven-plugin for releases and maven-deploy-plguin for snapshots, but I would like to keep it simple and use only one.
WDYT @mjurc ? (cc @michalvavrik if you want to participate)

Please check the relevant options

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Dependency update
  • Refactoring
  • Release (follows conventions described in the RELEASE.md)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update
  • This change requires execution against OCP (use run tests phrase in comment)

Checklist:

  • Example scenarios has been updated / added
  • Methods and classes used in PR scenarios are meaningful
  • Commits are well encapsulated and follow the best practices

@mocenas mocenas requested a review from mjurc November 26, 2024 12:32
@mocenas mocenas marked this pull request as draft November 26, 2024 12:32
@michalvavrik
Copy link
Member

cc @michalvavrik if you want to participate

sorry, I don't unless you need me; I had to deal with some personal stuff and am behind with my work

@mjurc
Copy link
Member

mjurc commented Nov 26, 2024

@mocenas We're using Nexus deploy plugin because that's what the Sonatype Central docs said to do all the way back. I'm actually not sure what they say now, but I don't really mind using maven-deploy-plugin instead.

Other thing was kinda that upstream Quarkus is using it. It's not a real blocker, but it's a nice fallback if all else fails

@mocenas mocenas changed the title WIP: Daily release Add daily release & change deploy plugin Nov 27, 2024
@mocenas mocenas marked this pull request as ready for review November 27, 2024 10:03
@mocenas
Copy link
Contributor Author

mocenas commented Nov 27, 2024

I finalized this PR and made it ready for review/merge @mjurc .

I tried locally to perform a dryRun release with new maven-deploy-plugin and it should work (emphasis on word should). If this is merged I recommend to do a release, just for testing purposes.

Copy link
Member

@mjurc mjurc left a comment

Choose a reason for hiding this comment

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

Dryrun works indeed, so I'm going to approve this.

@mocenas can you please open PR for test release too? Feel free to assign me as reviewer.

@mjurc mjurc merged commit 36eac7b into quarkus-qe:main Nov 27, 2024
7 checks passed
@mocenas mocenas mentioned this pull request Nov 27, 2024
11 tasks
@mocenas
Copy link
Contributor Author

mocenas commented Nov 27, 2024

Dryrun works indeed, so I'm going to approve this.

@mocenas can you please open PR for test release too? Feel free to assign me as reviewer.

PR for test release created - #1419

@mjurc
Copy link
Member

mjurc commented Nov 27, 2024

@mocenas seems it doesn't work, can you revert and look into it? thank you

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.

3 participants