[英]How retrieve information from web-hook trigger in Jenkins?
I am using Gitlab community edition and I created a web-hook to my project which is trigger in push events. 我正在使用Gitlab社区版,并且为项目创建了一个Web挂钩,该挂钩在推送事件中触发。 This web-hook successfully trigger the Jenkins job but I need some additional information for my jenkins job like branch name and etc. Jenkins version 1.640.
此网络挂钩成功触发了Jenkins作业,但我需要一些其他信息来执行我的jenkins作业,例如分支名称等。Jenkins版本1.640。
I tried to follow this instruction: https://github.com/jenkinsci/gitlab-hook-plugin . 我试图遵循以下指示: https : //github.com/jenkinsci/gitlab-hook-plugin 。
I write this code to the job echo ${FULL_BRANCH_REFERENCE}
but there is nothing in it. 我将此代码写入作业
echo ${FULL_BRANCH_REFERENCE}
但其中没有任何内容。
I used this url in the web-hook: http://xxxx:8080/job/gitlab/build (build_now did not work for me) 我在网络挂钩中使用了以下网址: http:// xxxx:8080 / job / gitlab / build (build_now对我不起作用)
Br, 溴
I have found two solution. 我找到了两种解决方案。 I followed this description: https://github.com/jenkinsci/gitlab-hook-plugin .
我遵循以下描述: https : //github.com/jenkinsci/gitlab-hook-plugin 。 First solution is using git-lab hook plug-in on Jenkins master.
第一个解决方案是在Jenkins master上使用git-lab hook插件。
Second solution could be Jenkins CI service which is not available on Git-Lab community edition. 第二种解决方案可能是Jenkins CI服务,该服务在Git-Lab社区版中不可用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.