I'm using Docker plugin for bamboo and I need to execute a script in the docker container.
The sh script contains:
echo \"ini_source_path\": \"${bamboo.ini_source_path}\",
and if I put this line directly in Container Command, the ${bamboo.ini_source_path} will be replaced with value of this variable.
The problem in when I put /bin/bashscript.sh in Container Command because I'm getting a error:
script.sh: line 35: \"${bamboo.ini_source_path}\",: bad substitution
Is there a way I can reach bamboo.ini_source_path variable from my script in docker container?
Thanks!
What version of Bamboo are you using? This problem was fixed in Bamboo 6.1.0:
Unable to use variables in Container name field in Run docker task
Workaround:
Run commands like
The Docker Task will be map the ${bamboo.working.directory} to the Docker \data volume.
So the just created scriptname.sh script is available in the Docker container.The script will be executed, and will set the variable correctly.