I am not able to pass values from my script to maven task 3.x
I am not able to refer the bamboo injected values under goal section of maven task.
Other bamboo plan variables are accessible but the Bamboo injected variables are not accessible
Hello @Hemant Sharma
Welcome to Atlassian Community!
Bamboo works normally with variables (native or injected) in Maven 3.x tasks. Can you show how you are declaring and consuming them? Also, let us know the Bamboo version you are using.
Cheers,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Hi @Eduardo Alvarenga
Bamboo version 9.2
Script configuaration task
Interpreter - /bin/sh or cmd.exe
script location Inline
FILE_NAME=variables.properties
...
# some code that generates value for below two variables.
...
echo "RELEASECANDIDATE=$RELEASE_CANDIDATE" >> $FILE_NAME
echo "ENVTYPE=$ENV_TYPE" >> $FILE_NAME
echo "**** SCRIPT COMPLETED ****"
Path to properties file - variables.properties
Namespace: - abcd
-settings ./settings.xml clean deploy -P${bamboo.ENVTYPE} -Denv=${bamboo.ENVTYPE} -Drevision=${bamboo.TAG_FOR_RELEASE}.${bamboo.RUNNING_NUMBER}-${bamboo.RELEASECANDIDATE}
the values ENVTYPE and RELEASECANDIDATE are not resolved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Hemant Sharma
You are missing the namespace declared during the Inject Bamboo variables task. Try:
Sincerely,
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.
No worries. Make sure to accept the answer so others can benefit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Eduardo Alvarenga
Bamboo version 9.2
Script configuaration task
Interpreter - /bin/sh or cmd.exe
script location Inline
FILE_NAME=variables.properties
...
# some code that generates value for below two variables.
...
echo "RELEASECANDIDATE=$RELEASE_CANDIDATE" >> $FILE_NAME
echo "ENVTYPE=$ENV_TYPE" >> $FILE_NAME
echo "**** SCRIPT COMPLETED ****"
Path to properties file - variables.properties
Namespace: - abcd
-settings ./settings.xml clean deploy -P${bamboo.ENVTYPE} -Denv=${bamboo.ENVTYPE} -Drevision=${bamboo.TAG_FOR_RELEASE}.${bamboo.RUNNING_NUMBER}-${bamboo.RELEASECANDIDATE}
the values ENVTYPE and RELEASECANDIDATE are not resolved.
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.