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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,551,907
Community Members
 
Community Events
184
Community Groups

1 Bitbucket repo to trigger 2 Jenkins jobs

Genevieve Awa
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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

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

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,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events