I have a pipeline with top-level agent but want to override single stage to run on different agent:
The idea is there are a lot of stages that execute on single node but there is one special stage that has to execute on special agent that is not in the pool (and move results around with stash).
My reading of https://www.jenkins.io/doc/book/pipeline/syntax/#agent and
JENKINS-37779 is that this should just work however when I tried this, Jenkins attempted to use just about any agent except the one matching special-agent:
I've found one post on stackoverflow claiming this is actually not supported: https://stackoverflow.com/questions/46630168/in-a-declarative-jenkins-pipeline-can-i-set-the-agent-label-dynamically#comment116214727_46631354 however this goes against referenced documentation.