Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Build Trigger details in case of multiple Repository

In my plan there are multiple repository , the build will have multiple task for each repository (Artifact creation). Trigger the build in case of any commit in a repository is easy but is there any way that I can get, which  repository and branch  triggered the build so that i can use some sort of condition to skip the task for( Artifact creation) for those  repository, where no changes have been commited. I am trying to the use the conditional plugin to skip the task from running if i get the get the details from trigger.

1 answer

1 accepted

2 votes
Answer accepted

Hi @sudswastik

What you are trying to achieve is hard to do in Bamboo, but I'll share the information I have in case it helps you moving forward.


To check which plan triggered the build you will need to compare the following variables:

  • bamboo_planRepository_#_revision
  • bamboo_planRepository_#_previousRevision

There is a Community post with an example of a possible approach to compare those variables on a "Unix like" agent:

The problem is, when you have this information, you can't use it as a source informaion for the Conditional tasks for Bamboo plugin. That is because it only accepts default Bamboo variables. If you discover which repository triggered the plan by using a script task (as suggested in the above post), you won't be able to use this information to avoid the task from running.

I opened a feature request to help us with this scenario in the future:


Possible approach

You could use the script to compare the Bamboo variables and then inject a new variable in your build that would tell you which repository triggered the build

To follow this idea you would need to configure your artifact creation on a script task and check the variable you injected (with the repo trigger information) to decide if you should run the commands or not on your script.

 

Note

There is another feature request that might interest you:


I encourage you to vote in both feature requests shared in this answer. They both could potentially help you and other customers facing similar needs.

I hope that helps! =]

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

190 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you