Jenkins declarative pipeline: What workspace is associated with a stage when the agent is set only for the pipeline?

ぐ巨炮叔叔 提交于 2019-12-04 06:37:34

The Pipeline code presented should only create a single workspace and run all stages in it. Unless you create a new agent directive in any of your stages it will not utilize another node or workspace.

btw, checkout scm happens automatically at the beginning of the Pipeline with Declarative so you don't need to explicitly call that out.

i'm 70% sure--based on anecdotal evidence--that you will always get the same workspace on the same node in different stages of a declarative pipeline if you specify a node at the top level and never override it, the way you're doing.

i reserve the right to adjust my confidence level as i receive feedback on this answer. :D

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!