Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How jenkins determine the progress bar's color (blue or red)

Tags:

jenkins

I'am using Jenkins now, and sometimes the build jobs stucked and with red progress bar. I am really confused how jenkins determine the color of the progress bar.

When it is blue? and when it become red?

Does anyone have ideas?

like image 394
Nancy Avatar asked Oct 29 '13 09:10

Nancy


People also ask

What symbol in weather condition in Jenkins represents most stable build?

The table in the middle shows for each job the build status (green balls for successful and stable builds, yellow for unstable builds, red for failed builds [not shown], and gray for disabled jobs), a weather report that includes several indicators, such as stability, test results, code coverage, and static analysis ( ...

What is blue signal indicates in Jenkins build process?

One of the most commonly asked questions, is about Jenkins' use of "blue balls" to indicate success by default. This is enough of an "issue" for some users that the Green Balls plugin is in the list of top 10 installed plugins.

What does the weather description symbol in Jenkins indicates?

Explanation. The weather column is a Column that can be used in Jenkins List views to displays a weather icon that represents the health of the item listed. The health is based on an aggregated score calculated mainly from build metrics. In the case of a Job, the health is calculated from the job build history.

Why does Jenkins use blue for success?

"It's not that the actual color of the lights are different when you go there." So, when Kawaguchi originally chose images for the Jenkins UI, he naturally looked for a blue icon, not green. "When I wrote the first Jenkins program that had the icon, for me, it was very natural to draw it using blue."


Video Answer


1 Answers

The progress bar is normally empty, filling with blue while a build in progress.

The amount of time it takes the progress bar to fill is based on the estimated job duration. This estimate is generally based on the average duration of the last few successful builds.

If there is no previous job data upon which to make a time estimation, the progress bar shows a stripy-blue animation.

From the build progress bar definition (as Jenkins 1.560), we can see that the property red becomes set when the build executor "is likely stuck" — i.e. it is taking significantly longer than the estimated time to complete.
Looking at the progressBar tag implementation, setting the red property causes the table.progress-bar.red CSS property to be applied to the bar.

In the Executor source code, we see that Jenkins defines "stuck" as the build taking ten times longer than the estimate. If there is no estimate, any build taking longer than 24 hours is considered stuck.

like image 189
Christopher Orr Avatar answered Sep 25 '22 05:09

Christopher Orr