Sameer Atharkar
Sameer Atharkar

Reputation: 442

Change Jenkins Status color or provide a message

I want to write a script for Jenkins which will change the status color of the jenkins from blue to green once the job is successful.

I am not much aware of the shell scripting, Can someone guide me on how and where should I start from?

Or is there any way I can provide a message as I have attached the screenshot.. The message for testing can be anything like "pipeline is passed"

enter image description here

Upvotes: 0

Views: 2713

Answers (3)

RaspberryCode
RaspberryCode

Reputation: 11

This plugin may be one of solutions: https://www.jenkins.io/doc/pipeline/steps/badge/ A lot of options to add badges, text to Build History

Example of result

Pipeline script for this specific result in scripted pipeline

node('master') {
    stage('test') {
        addShortText('pipeline has passed')
    }
}

Note: Same results can be achieved in declarative pipeline for code generation go to yourJenkinsAddress/pipeline-syntax/ and select addShortText, addBadge or any other method from this plugin in Sample Step:

Pipeline-syntax generation example

Upvotes: 1

Dmitriy Tarasevich
Dmitriy Tarasevich

Reputation: 1242

To change color from blue to green just install green balls plugin))

Upvotes: 0

penguin02007
penguin02007

Reputation: 79

The default color for successful job is blue (Meant pipeline is successful). I don't think you can add another message or color. You can try customize the the build name with the Build Name Setter.

Jenkins also have another status - unstable which means non-failed errors.

enter image description here

Upvotes: 0

Related Questions