Use special agent for whole pipeline when a condition is met
问题 There is declarative pipeline. In the beginning of pipeline block the agent selection is made using agent directive. Label-based selection is being conducted. Agent selected this way is the standard/default agent. How to set for whole pipeline a special agent when certain condition is met? The plan is to do condition check based on pipeline's one parameter >> can that work? What are the points the chosen approach needs to address? Current solution blueprint: Groovy code prior to pipeline