在Jenkins2之前我使用Build Pipeline Plugin构建并手动将应用程序部署到服务器.旧配置:

这很好用,但我想使用从groovy脚本(Jenkinsfile)生成的新Jenkins管道来创建手动步骤.
到目前为止,我想出了input詹金斯的一步.
使用jenkinsfile脚本:
node {
stage 'Checkout'
// Get some code from repository
stage 'Build'
// Run the build
}
stage 'deployment'
input 'Do you approve deployment?'
node {
//deploy things
}
Run Code Online (Sandbox Code Playgroud)
但是这等待用户输入,注意到构建没有完成.我可以添加超时input,但这不允许我选择/触发构建并在以后部署它:
如何使用新的jenkins-pipeline与Build Pipeline Plugin之前的手动步/触发相同/类似的结果?