问题描述
我有这个奇怪的要求。我有多个类似的工作。
例如,一个工作有四个阶段。 (工作名称:service-a
)我也有service-b,service-c工作...
pipeline {
agent any
stages {
stage('stg1') {
steps {
sh 'sleep 5'
}
}
stage('stg2') {
steps {
sh 'sleep 5'
}
}
stage('stg3') {
steps {
sh 'sleep 5'
}
}
stage('approve stg4?') {
steps{
input(message: "stg4 approve")
}
}
stage('stg4') {
steps {
sh 'sleep 5'
}
}
}
}
上述工作的批准阶段通常会超时或中止。在某个时候,我想调用作业的所有stage4部署,如下所示。
有可能吗?
pipeline {
agent any
stages {
stage('service-a stg4 deploy') {
steps {
build job: 'service-a' // how to mention specific stage??
}
}
stage('service-b stg4 deploy') {
steps {
build job: 'service-b' // how to mention specific stage??
}
}
stage('service-c stg4 deploy') {
steps {
build job: 'service-c' // how to mention specific stage??
}
}
...
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)