Jenkins Pipeline job isn't triggered on GitHub push

心已入冬 提交于 2019-12-08 02:03:59

问题


I've created Jenkins Pipline job and want it to be triggered on my GitHub repo push event.

I've added repo url to job config and checked "trigger on push option":

I've also added GitHub token with needed rights to jenkins configure Github section:

In Github repo I've enabled webhook for my Jenkins server:

And after all steps still nothing is triggered after push to my GitHub repo.

Does anyone have any idea what's going on and why Jenkins doesn't trigger configured pipeline job?


回答1:


Solution mentioned by OP in a comment is correct.

Assuming you have a Github webhook for your Jenkins set up correctly and accessible (can be verified in the Github UI), you need to start the build manually once. Upon completion of the build, changes in the repository will automatically start new builds.




回答2:


With Github hook trigger for GITScm polling, you need to enable "Poll SCM" option because github push triggers git polling to verify if there is a new change and then runs the build if a change is found. You can keep the cron schedule empty.Github webhook with scm poll



来源:https://stackoverflow.com/questions/43758656/jenkins-pipeline-job-isnt-triggered-on-github-push

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!