maven - Triggering Jenkins Builds after GIT commit -
i have 2 build jobs. 1 of them term template job, builds code , pushes nexus. build parameterized, , accepts parameters such artifact etc. build pulls code git, , has git repository defined.
the other build job uses parameterized trigger plugin call template job. supplies parameters such artifact name etc. template job, in turn executes build.
i have read web hooks can create, notify jenkins ci trigger build after commit made repository. however, reading through git plugin documentation, says git plugin trigger build build jobs have "poll scm" checked off, , have git repository defined in job configuration.
this bit of dilemma because our template job parameterized, , calling job doesn't have git defined in it. idea behind configuring jobs in manner minimize maintenance headache involved in defining repetitive jobs , going them if changes in structure of job.
please let me know if there plugins available able trigger specific jobs, or if parameterized/templated job structure might not way go. i'm open suggestions.
using webhooks integrate jenkins more efficient "poll scm" method adds unnecessary load jenkins , git repo. unnecessary load can cause performance issues in larger development organizations. if in smaller organization though, performance might not issue , return on investment moving webhook model might not there.
there other reasons use webhooks besides avoiding poll scm. plugins have features offer other benefits. 1 example github pull request builder if hosting repos on github:
https://wiki.jenkins.io/display/jenkins/github+pull+request+builder+plugin
of course, github needs configured send webhooks well:
providing parameterized jobs isn't preventative of setup , parameterized trigger jobs can used chain jobs in pipeline or similar configuration. iirc, should able git build information github webhooks integration if go route, otherwise need retrieve git information other method (e.g. stored in jenkins job config) in job prior parameterized trigger call.
in summary, decision go webhook setup should come down whether cost of setup worth functionality gain. if using github , build pull requests, cost of setting jenkins plugin , configuring github webhooks not , useful functionality in return. on other hand, if hosting git repos on proprietary stack , goal avoid poll scm 20-person development environment, cost more , return in value questionable.
Comments
Post a Comment