在阅读了pipeline和Jenkinsfile文档后,我有点困惑如何创建一个阶段->生产的流水线。
一种方法是使用 input
步骤,例如:
node() {
stage 'Build to Stage'
sh '# ...'
input 'Deploy to Production'
stage 'Build to Production'
sh '# ...'
}
这种方式有些笨重,因为它会一直阻塞执行器,直到你想部署到生产环境。有没有其他方式可以从Jenkins进行部署呢?