gpt4 book ai didi

jenkins - 如何在 Jenkins 中获取管道作业的 URL

转载 作者:行者123 更新时间:2023-12-04 08:52:16 25 4
gpt4 key购买 nike

我们正在 Jenkins 中建立一个持续交付管道,使用构建管道插件。

我们的部署步骤使用专有的部署工具(由来自 jenkins 的 HTTP 请求触发),但我们需要有一个额外的 Jenkins 步骤来对当时部署的项目进行验收测试。所以我们的部署工具需要触发最后一个管道步骤。

Jenkins 对此的设置很明显:

For a Manually Triggered downstream build step: To add a build step that will wait for a manual trigger:

  • Select the Build Pipeline Plugin, Manually Execute Downstream Project check-box
  • Enter the name(s) of the downstream projects in the Downstream Project Names field. (n.b. Multiple projects can be specified by using comma, like "abc, def".)


来源: Build Pipeline Plugin

问题是:我似乎找不到通过 URL 触发此下游构建的方法。

事实上,我需要部署作业中的 URL,所以我可以将它作为回调 URL 发送到部署工具。有人可以帮忙吗?

最佳答案

如果我理解正确,您想使用远程访问 API,据我所知,这与一般项目或管道之一没有区别。
看看这里:

https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

Submitting jobs Jobs without parameters You merely need to perform an HTTP POST on JENKINS_URL/job/JOBNAME/build?token=TOKEN where TOKEN is set up in the job configuration.



enter image description here

关于jenkins - 如何在 Jenkins 中获取管道作业的 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23782635/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com