如何使用Jenkins CLI触发并移动到管道的下一个阶段?

问题描述 投票:0回答:1

我的管道中有三个阶段。

  1. 建立
  2. 部署
  3. 测试

我将使用jenkins CLI远程触发此管道,然后根据需要将其推广到下一阶段。是否有任何CLI命令可以触发管道进入下一阶段?

jenkins-pipeline jenkins-cli
1个回答
0
投票

您可以使用输入作为阻止部分,例如

stage {
    steps {
        //other steps, and finally the input
        input id: 'Input1', message: 'Deploy to Production?'
    }
}

对于远程触发只是做

https://[jenkins_base_URL]/job/[job_name]/[build_id]/input/Input1/proceedEmpty

如果它会抱怨面包屑

https://MY_JENKINS_RUL/crumbIssuer/api/json
© www.soinside.com 2019 - 2024. All rights reserved.