-
Improvement
-
Resolution: Unresolved
-
Major
-
None
-
Version 2.462.1
I am using the Multi-Branch Pipeline plugin and dynamically generating a declarative Jenkinsfile from a stored template in the Git repository. For this process, I use the built-in node block. Once the Jenkinsfile is created, I attempt to load it using the load method, which works as expected.
However, as soon as the declarative script is loaded, the load command tries to execute immediately. Since the pipeline is long-running and utilizes multiple nodes throughout its execution, the initial node used for creating the Jenkinsfile remains occupied, leading to resource contention.
I would like to load the Jenkinsfile similarly to how readTrusted works, but without using a node block. Alternatively, I am looking for a way to introduce a delayed execution after the script is loaded, ensuring that the initial node is not occupied unnecessarily during the delay.