0

I'm running a single-node Jenkins instance on a project where I want to clean up closed PRs intermittently. The system can keep up just fine with the average PR submission rate; however, when we re-run the scan repository against the project the system encounters a ton of parallel build congestion.

When we run scan repository the multi-branch pipeline fires off the separate stages and those generally complete sequentially without issue and without hitting timeouts; however, the priority of declarative post actions seems lower than the other stages (no special plugins are installed that would cause that AFAIK). The behavior exhibited is that parallel builds start running impacting the total run-time for any one branch or pull request such that all of the builds might indicate say 60 or 90 minute build times instead of the usual 6-10 minutes when the only task remaining is filling out the checkstyle reports or whatever minor notifications tasks there are.

Is there a way to dedicate a single executor thread on the master node for declarative post actions so one branch or PR can be ran from end-to-end without being stuck waiting for available executors that have suddenly been picked to start a different PR or branch and run the earlier (and computationally expensive stages like linting code and running unit tests) in order to avoid ultimately hitting a timeout?

just waiting....

JPeterson
  • 77
  • 1
  • 9
  • This shouldn’t be the usual behavior. Could you post a sample of your pipeline? – Dibakar Aditya Jan 18 '20 at 13:53
  • On a side note, you can prevent rebuilding already built PRs that have no new changes, while scanning the repository by using the option **Build strategy** > **Change requests** > **Ignore rebuilding merge branches when only the target branch changed**. This is applicable only to the PR builds and won’t impact the branch builds. The latter continue to be built on PR merges. – Dibakar Aditya Jan 18 '20 at 14:03
  • I have the same issue, did you figure it out? – m__ Apr 09 '20 at 07:23
  • Nope, still observing this issue with multibranch pipelines when we have a bunch of jobs queued up (e.g., scan the repository). Ths project has anywhere from say 50+ branches open along wiht around 90-100 PRs open at any given time. I can't post the pipeline due to it containing a lot of proprietary code; however, I can fairly consistently reproduce this when running a single Jenkins server and agent set to any for many of the steps. – JPeterson Nov 24 '20 at 21:59

0 Answers0