Pipeline - while loop causes performance issue

Issue

  • Jenkins UI is running incredibly slow
  • Pipeline Stage View UI is not responding or running slowly
  • Pipeline Builds are never finishing

Environment

  • CloudBees Jenkins Enterprise
  • Pipeline Plugin

Resolution

Try not to use use while loops inside of Pipeline code. A better alternative would be a Retry + Sleep blocks.

This will eliminate the possibility of an endless cycle of a build because it will stop trying after a certain number of attempts. Additionally it ensures that a failure is recorded if the deployment gets frozen.

Reference

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.