0

We have 2 repos related to each other. The pipeline job checks out both one after another. So ideally it should run whenever there's a change in either repo checked in.

Is it possible to set it to run from webhook trigger coming from either repo or is SCM polling for both repos is the only option?

Arghya
  • 240
  • 1
  • 16

1 Answers1

0

Yes, this is possible. You need to configure webhooks on your both git repositories targetting the same pipeline, so, whenever there is a change on whatever repo, the same pipeline is started.

nandilov
  • 699
  • 8
  • 18
  • Git repository is set to point to the Jenkins-URL/github-webhook. It doesn't point to specific pipeline. So how can I do that? – Arghya Apr 27 '20 at 11:05
  • I've never done with github, only with gitlab, but we should be able to do the same. Configure the same webhook on your second repository, and then on your Jenkins job, select the option: `GitHub hook trigger for GITScm polling` – nandilov Apr 27 '20 at 11:29