Nancy
Nancy

Reputation: 1283

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

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?

Upvotes: 38

Views: 20694

Answers (1)

Christopher Orr
Christopher Orr

Reputation: 111555

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.

Upvotes: 68

Related Questions