Reputation: 967
I have 50+ repositories in a BitBucket project and I want them to execute the same job when a commit is pushed (that is maven build and deploy to artifactory). I tried to create a Maven job and make it work, but that can be linked to only one repository. I also tried installing the Bitbucket Team plugin and creating a project with it, and I think this could lead to a solution. In fact I saw that it scans automatically all the repositories with a JenkinsFile in it, so I thought that I could create a common Pipeline on jenkins and call this pipeline from every JenkinsFile in every repository. The problem is that I still have to create a JenkinsFile for each repository, and I don't want to do that. Is there anyway that I can trigger the same Jenkins job from all my repositories?
Upvotes: 1
Views: 736
Reputation: 111
You can use Remote File Plugin for this. What you need to do is,
This way, for every repository in your BitBucket, this Jenkins file will be run.
Hope this helps.
You can find the example screenshot below.
You can find it under Project Recognizers
Upvotes: 1