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

Support testing SNAPSHOTs that have a deterministic git revision #543

Merged
merged 2 commits into from
May 16, 2023

Conversation

jtnord
Copy link
Member

@jtnord jtnord commented May 11, 2023

If a SNAPSHOT build is in the override war and it was built with a version of maven-hpi-plugin 3.42 or higher (jenkinsci/maven-hpi-plugin#436) then we have a concrete git sha we can use for checkout of the plugin.

So this relaxes the enforcement of not building non releases by allowing to test a SNAPSHOT also so long as we have a git commit for it.

in the case the commit is HEAD (which is set by the legacy plugin extractors) then we will refuse to test the plugin the same as we do today.

Testing done

  • I deployed a unique snapshot of a multi-module project (version number made unique by changing it to 2.25-JTN-SNAPSHOT
  • The deployed version was then used in a custom war (2.25-JTN-20230512.152321-1)
  • The war was then run through CloudBees' PCT setup

I manually inspected the resulting logs and ensured that:

  • Each plugin from the multi-module project was checked out and had the PCT run against it correctly
  • plugins that dependend on any of the plugins deployed in step 1 where correctly updated by maven-hpi-plugin to use the SNAPSHOT version of the dependency

e.g.

[2023-05-12T21:13:02.916Z] [INFO] After resolving,
 updates: {com.cloudbees.jenkins.plugins:cloudbees-casc-items-controller=2.25-JTN-20230512.152321-1, ....

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

@jtnord jtnord force-pushed the support-snapshots branch 2 times, most recently from 8cf2404 to 5035945 Compare May 12, 2023 13:12
If a SNAPSHOT build is in the override war and it was built with a
version of maven-hpi-plugin 3.42 or higher (maven-hpi-plugin#436) then
we have a concrete git sha we can use for checkout of the plugin.

So this relaxes the enforcement of not building non releases by allowing
to test a SNAPSHOT also so long as we have a git commit for it.

in the case the commit is HEAD (which is set by the legacy plugin
extractors) then we will refuse to test the plugin the same as we do
today.
@@ -20,6 +21,6 @@ public String getProperty() {

@Override
public String getMinimumVersion() {
return "3.41";
return "3.44";
Copy link
Member Author

Choose a reason for hiding this comment

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

in order to test other plugins against snapshots we need jenkinsci/maven-hpi-plugin#478 released in 3.44.

@jtnord jtnord marked this pull request as ready for review May 15, 2023 11:04
@jtnord jtnord requested a review from a team as a code owner May 15, 2023 11:04
@jtnord jtnord merged commit bdd6f88 into master May 16, 2023
@jtnord jtnord deleted the support-snapshots branch May 16, 2023 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants