I am not able to pass values from my script to maven task 3.xI 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 AlvarengaAtlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Hi @Eduardo Alvarenga Bamboo version 9.2Script configuaration taskInterpreter - /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_NAMEecho "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 are missing the namespace declared during the Inject Bamboo variables task. Try:
Sincerely,
Thanks a lot for the quick response @Eduardo AlvarengaThe solution helped.
It looks like you're new here. Sign in or register to get started.