Ignore SCM Polling schedule option from job Config.

23 views
Skip to first unread message

ad...@yahoo-inc.com

unread,
Feb 20, 2015, 3:30:30 PM2/20/15
to jenkin...@googlegroups.com
Hi,

     Internally we use Git as the SCM with git plugin which triggers poll on push request. For internal use I am looking for a way to Ignore the SCM polling schedule option from the job configuration page, so that jobs are only triggered on push notifications and not based on cron values in this field.
    
   One of the possible ways i thought of was to replace the already present SCMTrigger object in the Job Trigger with a new SCMTrigger with empty spec value when a user saves the Job Configuration, but i couldn't find a good extension point to do so. Took a look at the SavebleListener but saving the project in onchange() doesn't look like a very good approach.

   Although ideally i would like to disable that option, but i couldn't find a way to disable UI elements of the config page with a plugin. If anyone has done something similar before would like to know their  thoughts.

   Any suggestions on the extension point or on the approach. I am looking of making this as a plugin or add it to git plugin and contribute back to the community so help from the community will help me to take the right approach from start.

thanks,
Aditya.
    

Craig Rodrigues

unread,
Feb 25, 2015, 3:08:01 PM2/25/15
to jenkin...@googlegroups.com
On Fri, Feb 20, 2015 at 12:30 PM, <ad...@yahoo-inc.com> wrote:
Hi,

     Internally we use Git as the SCM with git plugin which triggers poll on push request. For internal use I am looking for a way to Ignore the SCM polling schedule option from the job configuration page, so that jobs are only triggered on push notifications and not based on cron values in this field.

I used the steps in that blog post to create a git post-receive hook which used curl to do
an HTTP POST on the Jenkins server to trigger a build.  Using this technique,
builds are triggered in response to push notifications.  It works great.

--
Craig
Reply all
Reply to author
Forward
0 new messages