mercurial webhooks triggering and modules

5 views
Skip to first unread message

m...@praqma.com

unread,
Feb 15, 2017, 4:13:21 AM2/15/17
to Jenkins Users
Hi all,

I have a structure of jobs which has a few general jobs, and a lot of component jobs. The source for all of them are in the same mercurial repo. I want to use webhooks from mercurial as triggers, and then the modules part of mercurial checkout to only run the relevant jobs. However it appears that all jobs are run on a webhook trigger no matter the module path. Is this as expected, and do anyone have an idea for how I can produce the setup want. I create the jobs as pipelineJob using jobDSL and seedjob to create them.

My job structure is something like this
ProjectName (folder)
   -> Branch name (folder)
       -> general 1 (job)
       -> general 2 (job)
       -> comp1 (job)
       -> comp2 (job)
       ->
       ->
       -> comp30

When I checkout in "general 1" I use this code:
checkout([$class: 'MercurialSCM',
  revision: 'default',
  poll: true,
  credentialsId: 'mercurial-RO',
  source: 'REPO-URL'])

and from comp1 I use this, where the modules path is included

checkout([$class: 'MercurialSCM', 
  revision: 'default', 
  poll: true,
  credentialsId: 'mercurial-RO', 
  modules: 'FrameworkComponents\\SystemServices', 
  source: 'REPO-URL'])

My webhook is based on the example on the plugin page:

[hooks]

commit.jenkins = wget -q -O /dev/null  JENKINS-URL/mercurial/notifyCommit?url=REPO-URL

incoming.jenkins = wget -q -O /dev/null JENKINS-URL/mercurial/notifyCommit?url=REPO-URL


Do any of you have any suggestions? My server is taking some hard hits by having to run all 30 jobs, when just one component is changed.

Reply all
Reply to author
Forward
0 new messages