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

Incrementalify plugins #15

Open
basil opened this issue Aug 18, 2023 · 0 comments
Open

Incrementalify plugins #15

basil opened this issue Aug 18, 2023 · 0 comments
Labels
recipe Requests for new automated code changes

Comments

@basil
Copy link
Contributor

basil commented Aug 18, 2023

It is considered a best practice for Jenkins plugins to implement incrementals. Among other benefits, this allows for easy testing of PR builds and is a necessary prerequisite for setting up automated release. The steps are, roughly:

  • If missing, create .mvn/extensions.xml with the latest version of git-changelist-maven-extension.
  • If missing, add .mvn/maven.config with -Pconsume-incrementals and -Pmight-produce-incrementals.
    • Note that -Dchangelist.format is also needed for automated release, but not necessary for the traditional release process.
  • If a version like <version>1.20-SNAPSHOT</version> is present, change this to <version>${revision}${changelist}</version> and add <revision>1.20</revision> and <changelist>-SNAPSHOT</changelist> to the <properties> section.
    • Note that this could be set to just <version>${changelist}</version> or even <version>${revision}.${changelist}</version> for automated release as described here.
  • If missing, add <gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> to the <properties> section.
    • Note that some plugins (not many, though) have an artifact ID that does not match their GitHub repository, so in that case one cannot use ${project.artifactId}.
  • Ensure the <scm> section reads like this:
<scm>
  <connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
  <developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
  <tag>${scmTag}</tag>
  <url>https://github.com/${gitHubRepo}</url>
</scm>

Incrementalifying a Java 9+ plugin for the first time will likely also expose #14.

@timtebeek timtebeek added the recipe Requests for new automated code changes label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Requests for new automated code changes
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants