Jenkins Pipeline job isn't triggered on GitHub push

10,241

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.


A note from user8888:

You actually need to manually start the build and the build must be successful. A failed build won't do anything.

Share:
10,241
Admin
Author by

Admin

Updated on August 01, 2022

Comments

  • Admin
    Admin over 1 year

    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": enter image description here

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

    In Github repo I've enabled webhook for my Jenkins server: enter image description here

    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?

  • mafrosis
    mafrosis almost 6 years
    This is incorrect. As in the comments above, a manual run is necessary to make Jenkins pick up the webhook.
  • Jeff Diederiks
    Jeff Diederiks almost 6 years
    The correct option is to correctly configure the "GitHub hook trigger for GITScm polling" option. The "Poll SCM" option warns, "Note that this is going to be an expensive operation for CVS, as every polling requires Jenkins to scan the entire workspace and verify it with the server. Consider setting up a "push" trigger to avoid this overhead"
  • p4t
    p4t over 4 years
    This was not obvious to me so to clarify for others - you actually need to manually start the build and the build must actually be successful. A failed build won't do anything.