Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

1 Bitbucket repo to trigger 2 Jenkins jobs

Genevieve Awa May 12, 2023

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.

3 answers

1 vote
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
May 23, 2023

Hi @Genevieve Awa

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 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!


Jennifer Dempsey, Product Marketing Manager, Appfire

0 votes
Igor Stoyanov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 19, 2023

@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

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 15, 2023

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,

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events