问题
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