[workflow-plugin] Replacing "When a change is pushed" Build Trigger Functionality

43 views
Skip to first unread message

Alan Ray

unread,
Feb 25, 2015, 1:02:00 PM2/25/15
to jenkins...@googlegroups.com
I'm trying to create my first workflow (we've been using freeform jobs), and I'm struggling to figure out how to get the commit hook running.

Normally in the freeform job, there is a option that says "Build when a change is pushed to GitHub". But in the workflow, that option doesn't exist (probably because GitHub doesn't explicitly support the workflow). There hints (e.g. https://groups.google.com/forum/#!searchin/jenkinsci-users/workflow$20scm$20trigger/jenkinsci-users/jyYn1F8X_2s/MWkxUmJCCMkJ) that running the workflow should create the necessary hooks, but that doesn't seem to be the case. I've played around with enabling polling (but with no schedule) and pushes to the repo still don't seem to trigger builds.

So I have two questions:
1. Is it possible to define a push trigger via the workflow? I know that Github is notifying us of repo changes because all my other jobs are successfully triggered when changes are pushed.
2. Is there a way to (easily) answer this question via documentation? One of the challenges I'm having with the workflow plugin is finding explanations for which plugins can be called and with what parameters. I have the sense that I'm missing something obvious, perhaps because I am so used to dealing with the UI.

Thanks,
Alan

Jesse Glick

unread,
Feb 26, 2015, 3:02:05 PM2/26/15
to jenkins...@googlegroups.com
On Wednesday, February 25, 2015 at 1:02:00 PM UTC-5, Alan Ray wrote:
Is it possible to define a push trigger via the workflow?

Not sure offhand; it is quite possible that a modest change is needed to the github plugin before this works.

Is there a way to (easily) answer this question via documentation?


If the trigger you mention does not appear for a workflow job, then just file it in the `github-plugin` component in JIRA, with the label `workflow`, and ask to have it listed in this section (PR to COMPATIBILITY.md, which is just the “pencil” button if logged in to GH; or just notify me directly).
Reply all
Reply to author
Forward
0 new messages