Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
487 views
in Technique[技术] by (71.8m points)

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?

question from:https://stackoverflow.com/questions/19653757/how-jenkins-determine-the-progress-bars-color-blue-or-red

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...