- Each
commandincontainer_commandruns in its own shell. Therefore, you can't rely on setting up environment variables before and using them later.
- Solution to this is to create a file which exports the environment variables that you want. Create this with the
filesconfig property and place it somewhere accessible. - Then place the commands you would want to be run by
commandin a.shfile. In that.shfile, source the environment variables file that was created earlier. Set thecommandto execute the.shfile. Make sure that the.shfile has executable permissions set locally becausegitsyncs those.