You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
In my build script I am referencing a system variable gradle_home. I want to substitute this with a bamboo variable so that I can override this value for a specific branch. However the build runs on different systems and the only way to reliably get the gradle_home for the system is via the system.gradle_home. So I am trying to get the bamboo variable to point to the system variable in normal case and to the new path in the overridden case. Is this possible?
Hello @Robins John
Welcome to Atlassian Community!
Choosing which variable to use is up to the application, not Bamboo. What you can do is set a script task that would evaluate if the custom variable is set and then overwrite the system.GRADLE_HOME if needed. You can do something like this:
Assuming:
Add a Script task that will evaluate the variable and call Gradle:
#!/bin/bash
if [ -n "${bamboo_GRADLE_HOME}" ] ; then
export GRADLE_HOME=${bamboo_GRADLE_HOME}
fi
${GRADLE_HOME}/bin/gradle build
More information:
Cheers,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.