AKS
AKS

Reputation: 17326

Jenkins job status - Customize color / status of job

Is there a way to customize the status of a Jenkins job to use different icons or colors other than just simple blue/green ball icons.

Something like what we see in cloudbees Jenkins instance or similar.

https://jenkins.ci.cloudbees.com/

For more (if possible), I'd like an option to have the ball status for a queued build job to change to a different color or icon. For example, a clock/stop-watch or an hour glass, or maybe change the color to a clear white sphere. This would help new users avoid accidentally launching a queued build multiple times expecting the job status icon to start flashing and etc.

Upvotes: 8

Views: 40609

Answers (3)

michaelbahr
michaelbahr

Reputation: 4963

Short answer:

With coding it's possible. And then there's also the Custom Job Icon Plugin.

Long answer:

I dealt with the Greenballs plugin changing the testresult trend chart to an ugly green. Thus I forked it and changed the color value.

In the project there were greenball icons. With some additional logic you may specify the icon being displayed depending on the status.

Note that this was not tested with Hudson, but only Jenkins.

Upvotes: 2

AKS
AKS

Reputation: 17326

The following plugins can help to achieve what I'm looking for (to some degree).

  1. https://plugins.jenkins.io/modernstatus/ (I'll poke around in this plugin to see if I can change this "Modern Status" plugin -- to change the icon(s) for ex: change icon to a pending/hour glass icon if a build is sitting in "queue" and etc).

  2. https://github.com/kralq/distinguishable-gray-balls-plugin

  3. https://plugins.jenkins.io/custom-job-icon/ (as Mike mentioned in the other reply) - to classify a job type (using various icons).

Upvotes: 11

Jonathan Benn
Jonathan Benn

Reputation: 3569

The answer seems to be in their code for BallColor.java.

At the time of this writing, here are all the possible values:

RED("red",Messages._BallColor_Failed(), ColorPalette.RED),
RED_ANIME("red_anime",Messages._BallColor_InProgress(), ColorPalette.RED),
YELLOW("yellow",Messages._BallColor_Unstable(), ColorPalette.YELLOW),
YELLOW_ANIME("yellow_anime",Messages._BallColor_InProgress(), ColorPalette.YELLOW),
BLUE("blue",Messages._BallColor_Success(), ColorPalette.BLUE),
BLUE_ANIME("blue_anime",Messages._BallColor_InProgress(), ColorPalette.BLUE),
GREY("grey",Messages._BallColor_Pending(), ColorPalette.GREY),
GREY_ANIME("grey_anime",Messages._BallColor_InProgress(), ColorPalette.GREY),
DISABLED("disabled",Messages._BallColor_Disabled(), ColorPalette.GREY),
DISABLED_ANIME("disabled_anime",Messages._BallColor_InProgress(), ColorPalette.GREY),
ABORTED("aborted",Messages._BallColor_Aborted(), ColorPalette.GREY),
ABORTED_ANIME("aborted_anime",Messages._BallColor_InProgress(), ColorPalette.GREY),
NOTBUILT("nobuilt",Messages._BallColor_NotBuilt(), ColorPalette.GREY),
NOTBUILT_ANIME("nobuilt_anime",Messages._BallColor_InProgress(), ColorPalette.GREY),

I was pointed to the answer from here.

Upvotes: 3

Related Questions