I would like to add extra columns to the build history sidebar that can be modified by user (comments,etc..).
Has anyone did something similar? or any suggestions how can it done easily?
I would like to add extra columns to the build history sidebar that can be modified by user (comments,etc..).
Has anyone did something similar? or any suggestions how can it done easily?
You cannot add columns to the build history without digging deeper into the Jenkins-internal layout engine.
The simplest solution to achieve what you want is to use the "Edit Build Information" menu item for a build. Users can add information there, and it's also possible to add HTML code with tables etc there, which can then look nicely in the build history.
It's not as interactive as what you're looking for, though, and it requires some discipline from your users to avoid that they destroy the build history format completely.
If you only need comments for failed builds, then the Claim plugin is a nice solution.
I know this is a very old post, but I stumbled over the same problem recently. My goal was to display an icon with a tooltip next to each run in the build history. You can extend this approach to add an image with a link or even a short custom text.
I was able to accomplish this by using the badge plugin. Keep in mind that your Jenkins instance needs to have the Badge plugin installed as well.
pom.xml
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>badge</artifactId>
<version>1.13</version>
</dependency>
RunListener
, override the onCompleted
method and add the badge@Extension
public class BadgeIconRunListener extends RunListener<Run<?, ?>> {
@Override
public void onCompleted(Run<?, ?> run, TaskListener listener) {
...
run.addAction(BadgeAction.createBadge("path/to/icon", "Tooltip"));
...
try {
run.save(); // saves the actions to the run's build.xml file
} catch (IOException e) {
// error handling
}
}
}
© 2022 - 2024 — McMap. All rights reserved.