是否可以在Jenkins代理程序之外执行步骤?
假设我具有以下Jenkinsfile结构:
pipeline {
agent none
stages {
stage('Example Stage') {
agent { someAgent }
steps {
run something ...
input ...
}
}
}
}
我想在代理外部执行input使其不阻塞数小时(超时不是答案;))
一种可能的解决方案是在单独的阶段中执行逻辑,但是我试图避免创建其他逻辑。
您可以使用node
代替agent
:
pipeline {
agent none
stages {
stage('Example Stage') {
steps {
node( someAgent ) {
run something ...
}
// outside of any agent
input ...
}
}
}
}