Polling both svn and git from pipeline

988 views
Skip to first unread message

taroc...@gmail.com

unread,
Oct 11, 2016, 8:47:08 PM10/11/16
to Jenkins Users
Is it possible to poll for changes from both svn and git repositories from within a pipeline job? In Jenkins, pipeline scm configuration is tied to a particular scm type (due to a radio button), but I would like to poll both svn and git at the same time. As a result of the poll detecting an scm change, I want to invoke only one build.

As a workaround, maybe I need to have two separate Jenkins jobs? 

Rachel

unread,
Oct 13, 2016, 4:56:16 PM10/13/16
to Jenkins Users
Hi,

In your case, I would have two separated Jenkins jobs, but sharing the same workspace:
  • Advanced Project Options > Use custom workspace
I hope be useful.

Best regards,
Rachel

Rachel

unread,
Oct 18, 2016, 5:44:22 PM10/18/16
to Jenkins Users
Hi,

Sorry, it's possible with Pipeline:

Polling is supported across multiple SCMs (changes in one or more will trigger a new build), and again is done according to the SCMs used in the last build of the pipeline.

You'll have to run it once manually for listening to SCM changes.

More information: https://github.com/jenkinsci/workflow-scm-step-plugin/blob/master/README.md

Best regards,
Rachel

taroc...@gmail.com

unread,
Dec 12, 2016, 4:12:52 PM12/12/16
to Jenkins Users

Hi,

Eventually I ended up building periodically and checking for SCM changee manually in each repository manually. It took some work, but I didn't want to define multiple jobs just for polling.

Taro
Reply all
Reply to author
Forward
0 new messages