每个 stage 部分都需要包含它自己的 agent。配置语法
stage
agent
pipeline { agent none stages { stage('Stage For Build'){ agent any } }