我正在尝试连接/实现以下目标:
- 具有多个阶段和任务的工作的管道
- 使用交付视图插件配置上述管道
- 最后阶段的最后一项任务是部署到生产环境[注意:希望此任务手动触发]
詹金斯版本:2.222.x
我尝试过的事情
node {
stage 'Build'
task 'Compile'
echo 'Compiling'
sleep 1
task 'Unit test'
sleep 1
stage 'Test'
task 'Component tests'
echo 'Running component tests'
sleep 1
task 'Integration tests'
echo 'Running component tests'
sleep 1
stage 'Deploy'
task 'Deploy to UAT'
echo 'Deploy to UAT environment'
sleep 1
task 'Deploy to production'
echo 'Deploy to production, but wanted with manual trigger'
sleep 1
}
下面是我正在寻找的所需配置。 所需的配置、交付管道插件 wiki
我可以通过使用上游和下游配置创建多个自由样式作业来实现手动触发,对于手动步骤,我可以使用手动触发设置后期构建作业。但这是我想要的东西,因为我们有任务(在舞台内我们也可以做单独的垂直任务)功能。
请帮助我并建议如何实现这一目标。