Problem resolving bamboo variable.

Hello,

We've been having some problems trying to pass an argument to our script that needs to resolve a filepath using the same directory that the build is been ran.

At first we tried using a relative path, like this: -b deploy.gradle -Dconf="conf/hml.properties"

But we've been getting a file not found on the conf/hml.properties.

Then we tried using a bamboo variable, like this: -b deploy.gradle -Dconf="${build.working.directory}/conf/hml.properties", expecting that the variable gets resolved to where bamboo is executing the script, but for some reason its not being resolved at all.

Variables should be resolved in arguments of tasks, right? Or am i thinking wrong?

Thanks for the help.

3 answers

As stupid as it sounds, it might have something to do with your quoting. That always gets me and that might be why the latter is not picking up the variable path.

Which Bamboo version are you using? And which builder/task? Ant?

I recall there was recently a bug in Ant task which prevented passing the variables to the Ant execution. Might it effect also script builder/task? Hm...

Which Bamboo version are you using? And which builder/task? Ant?

I recall there was recently a bug in Ant task which prevented passing the variables to the Ant execution. Might it effect also script builder/task? Hm...

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,316 views 0 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you