Srinivas
Srinivas

Reputation: 321

Jenkins Build History list view change for a job

By default jenkins displaying last 30 builds on the build history view pane. We can trace older builds by clicking More link available at end of the pane. Is there a way to change the list count from default 30? Is it also possible to change this limit per job basis. please suggest approach to get it done if it is not configurable thing.

=Srinivas

Upvotes: 2

Views: 7680

Answers (1)

Tidhar Klein Orbach
Tidhar Klein Orbach

Reputation: 2974

You can configure it to a different amount than 30, but only when you start Jenkins and the configuration is for all jobs.

take a look at hudson.widgets.HistoryWidget class in Jenkins core, there you would find the following property:

private static final int THRESHOLD = Integer.getInteger(HistoryWidget.class.getName()+".threshold",30);

that threshold determines how many builds would appear in the history widget. the property takes its value from a system property or uses the default 30. it is also final, so it cannot change after the first assignment.

so for example, you can start jenkins with -Dhudson.widgets.HistoryWidget.threshold=10 and then you'll have only 10 builds in the history widget.

Upvotes: 4

Related Questions