Can a single Bitbucket repository trigger multiple Jenkins jobs?
I was able to successfully trigger one Jenkins job with a push to the Bitbucket repository, but when attempting to create another Jenkins job for the same repository, it did not work. However, I am able to manually start a build from the repository. Both jobs are targeted for different branches.
It's worth noting that I tried using Jenkins multibranch pipeline, which worked for my needs, but it did not provide environment variables for each job. Instead, I had to specify them in my Jenkinsfile, which is not ideal. I want the Jenkinsfile for each branch to be the same to avoid merge conflicts.
As Theodora suggested, you may want to consider a plugin. Appfire's Webhook to Jenkins for Bitbucket is an easy-to-configure integration app for Cloud or DC that will allow you to trigger a build in Jenkins when a Pull Request is merged.
You can reach out to our awesome support team to ask any questions you might have.
You can also email me at Jennifer.dempsey@appfire.com and I can put in contact with our PM to further discuss your needs and schedule a demo. We'd be happy to help you any time!
Best,
Jennifer Dempsey, Product Marketing Manager, Appfire
@Genevieve Awa hi. Also you could try to use jenkins-job-trigger pipe, which allows you to trigger jobs from pipelines.
There is also a guide of how to setup pipelines for specific branches .
Maybe combining this two guides should help you to solve you problem.
Regards, Igor
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Genevieve,
I think it may be best to ask this question to the Jenkins forum or check the plugin's documentation in case they have a different place where you can ask questions related to the plugin.
There are several plugins available to integrate Bitbucket Cloud and Jenkins, however, none of them are developed by Atlassian. The way that most of these plugins work is by setting up a webhook in a Bitbucket Cloud repo, that will send a request to Jenkins once an event that triggers the webhook occurs (e.g. on every push). What happens once that request is sent, depends on Jenkins and the plugin's configuration.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.