在浏览了管道和Jenkinsfile文档后,我对如何创建Stage - > Production管道感到有些困惑.
一种方法是使用这样的input步骤
node() {
stage 'Build to Stage'
sh '# ...'
input 'Deploy to Production'
stage 'Build to Production'
sh '# ...'
}
Run Code Online (Sandbox Code Playgroud)
这似乎有点笨拙,因为这将一直阻止执行程序,直到您要部署到生产.Jenkins是否有任何替代方式可以部署到生产环境.