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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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
Community Members
Community Events
Community Groups

Conditional task replacement issue


I have a strange scenario I am struggling to figure out. 

I have two sequential conditional tasks on a build plan.  The condition is on a Bitbucket variable coming in to the build called

The first step I check if it exists, if it does the command runs with the variable being substituted with the actual key from Bitbucket and the command runs fine.

The second step I check if it does not exist and I run a build on the base branch using a different variable.

Interesting once the variable is substituted in the first step, the second conditional does not find it and therefore also runs instead of being skipped.

This is the log where you can see it being odd, the condition all of a sudden says that variable does not exist.

simple  11-Mar-2021 14:40:21    All conditions for task 'Sonar Scan PR' were met. Conditions: Variable exists

command 11-Mar-2021 14:40:21    Substituting variable: ${} with 19

command 11-Mar-2021 14:40:21    Substituting variable: ${} with feature/SonarBuildTest

command 11-Mar-2021 14:40:21    Substituting variable: ${} with dev

***<logs cut here>***

simple  11-Mar-2021 14:41:16    All conditions for task 'Sonar Scan Branch' were met. Conditions: Variable not exists

command 11-Mar-2021 14:41:16    Substituting variable: ${bamboo.repository.git.branch} with feature/SonarBuildTest


Does the variable only become available to the job if it is referenced in the argument?  That is the only thing I can think of apart from it being a bug (or something I am overlooking of course)

Any help would be appreciated! :)


1 answer

1 accepted

1 vote
Answer accepted
Alexey Chystoprudov
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Mar 12, 2021

Don't use "bamboo." prefix and see how it goes

Many thanks Alexey that worked.  

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events