Use plugin bill of materials
This site is the new docs site currently being tested. For the actual docs in use please go to https://www.jenkins.io/doc. |
Updating the versions of plugin dependencies manually can be exhausting, looking for the correct set of versions that work with each other and do not cause upper-bounds dependency error reports. The Jenkins plugin bill of materials simplifies that by shifting the evaluation of versions from each plugin author to a centralized process maintained by members of the Jenkins community.
Create a branch
In a local copy of your fork of the plugin repository create a git branch for your work with the command:
git checkout -b {task-identifier} master
Use the plugin bill of materials
Add a dependencyManagement
section to the dependencies
section of the pom file that references the most recent version of the plugin bill of materials for that line.
For example, the addition might look like:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.401.x</artifactId>
<version>2643.vfa_93ff299d20</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
Remove as many <version>
declarations from the pom file as you can while still compiling successfully.
Compile the updated code with the command:
mvn clean verify
Create a pull request
Commit that change:
git add {modified-files}
git commit -m "{task-description}"
Push the change to GitHub:
git push origin --set-upstream {task-identifier}
Total 0 (delta 0), reused 0 (delta 0), pack-reused 0 remote: remote: Create a pull request for '{task-identifier}' on GitHub by visiting: remote: https://github.com/user/your-plugin/pull/new/{task-identifier} remote: To github.com:user/your-plugin.git * [new branch] {task-identifier} -> {task-identifier} Branch '{task-identifier}' tracking remote branch '{task-identifier}'.
Notice that the output of the command includes the URL, which can be used to open a pull request. Copy that URL in your web browser and submit a pull request.