Amit
Amit

Reputation: 11

Trigger Jenkins build only if there was a git commit in that repo which is not configured in pipeline definiton

I have two Git repository A and B. I'm using Jenkins Pipeline for the build, with Pipeline Definition "Pipeline script from SCM" and am calling "Jenkinsfile" to trigger the build.

I have one dependency due to which I need to give Repository A in my pipeline definition on Jenkins. The Jenkinsfile of Repo "A" clone the Repo "B".

My requirement is to trigger the build only if any change is made into Repo "B". Please note in Jenkins as I mentioned earlier I have configured Repo "A". While I know we can have a Git Webhook configured for Repo "A", I'm not sure how we can configure Git Webhook in this case for Repo "B".

So, Is it possible to achieve what I want via Poll SCM? OR Is there any other way via which it can be achieved?

Thanks

Upvotes: 1

Views: 365

Answers (0)

Related Questions