I have a plan variable called myCustomVar="myvalue"
I can successfully use it inside my script tasks calling it ${bamboo.myCustomVar}, however I am looking to modify the variable's value in one of the tasks. I have tried the following with no success:
I have been thoroughly seeking for an answer in documentation with no success, all I have found is that we can override variables in manual builds but this will not work for my purpose,
Thank you
Hello @Vazquez_ Eduardo
Welcome to Atlassian Community!
If you are looking to only modify the variable's value in one of your tasks you will have to do that on the command line during the task execution. Also, Script tasks in Linux use the ${bamboo_myCustomerVar} syntax (with a _ instead of dots .). As described here:
But if you want to have a controlled experience, you can add an Inject Bamboo Variables task that would create new variables based on property files which can be used subsequently by your builds.
Best regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Thank you for your prompt response. It seems your first paragraph pretty much describes what I am trying to do with the only exception that my task script is run on windows, would this also apply? If so I am thinking the syntax would be one of the options below:
The inject bamboo variables task sounds great but for now I think the solution above should suffice should you confirm the appropiate syntax for windows.
Best regards,
Eddie
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Vazquez_ Eduardo
If you are using Windows, there's no need to replace the dots with underscores. So the "set" command will work as required with the variables set as bamboo.myCustomerVar.
Best regards,
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.