Details
-
Bug
-
Resolution: Answered
-
Medium
-
5.9.7
-
Severity 2 - Major
-
Description
Remote Agent with Docker capability has environment variable $USER set to 'santa'.
Create a Plan which runs 2 tasks.
First task is a Script Task, that just does an "echo user=$USER".
Second Task is a Docker Task, which runs an ubuntu container.
Configure Docker task with:
Container command = /bin/bash -c "env|sort"
Container environment variables = $WHO_C=$USER $WHO_C2='claus'
Advance > Environment variables = $WHO_E=$USER $WHO_E2='claus'
The agent buildlog shows that the Script Task correctly shows "user=santa".
It then starts the Docker Task with
command line: /bin/docker run -e $WHO_C2=claus -e $WHO_C=$USER
environment: $WHO_E=$USER $WHO_E2=claus
The $USER environment variable is not expanded.
This blocks the option to pass environment and Bamboo variables to the Docker container.