Jenkins从GitHub工作流程访问工件工作
当提交到分支时,我有一个 GitHub Webhook 触发 Jenkins。 詹金斯正在使用多分支管道。 当 Jenkins 运行其作业时,它会检查导致 Webhook 触发的提交。 此外,Jenkins 环境中还提供 GIT_COMMIT 和 GIT_BRANCH。
我希望 Jenkins 管道:
- 等待 GitHub 操作完成(它构建代码并将二进制文件存储为作业工件)
- Jenkins 下载 GitHub 作业的二进制工件
该信息似乎在有效负载中可用(值html_url 字段)由 GitHub 发送到 Jenkins,但我不明白如何访问 Jenkins 管道中的 webhook 有效负载。
对于问题的任一方面的任何帮助表示赞赏。
我尝试过访问Jenkins中的环境,并修改GitHub中的触发器
I have a GitHub webhook triggering Jenkins when a commit is made to a branch.
Jenkins is using a Multibranch Pipeline.
When Jenkins runs its job it checkouts the commit which caused the webhook trigger.
Additionally, available are GIT_COMMIT and GIT_BRANCH in the Jenkins environment.
I would like the Jenkins pipeline to:
- Wait until the GitHub action has completed (it builds the code and stores the binary as a job artifact)
- Jenkins to download the binary artifact for the GitHub job
The information seems to be available in the payload (value of html_url field) sent by GitHub to Jenkins, but I do not understand how to access the webhook payload in the Jenkins pipeline.
Any help appreciated on either aspect of the problem.
I have tried accessing the environment in Jenkins, and modifying the triggers in GitHub
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论