The process environment variables overrides the system variables (if any).
If you're interested only in the environment variables that are shown above
you don't have to worry about value being changed or overwritten by another
process because GoCD uses *bash -c* to run tasks with the new variables
injected as part of the run, so these values can't be changed from outside.

On Sat, 30 Jan, 2021, 21:32 [email protected], <[email protected]> wrote:

> From my understanding, "env" prints out all the system environment
> variables, rather than the process environment variables. If I used "env"
> and a parallel job was running, wouldn't it overwrite the environment
> variables (non thread-safe env vars)?
>
> On Saturday, January 30, 2021 at 3:48:59 PM UTC [email protected]
> wrote:
>
>> If you're on a Linux instance try using the *env* command.
>>
>> On Sat, 30 Jan, 2021, 21:14 [email protected], <[email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I am deploying an image to AWS ECS using task definitions. In order for
>>> me to inject the environment variables from Go into the task definition, I
>>> require all the environment variables that Go sets when a pipeline is
>>> running.
>>>
>>> For instance:
>>> [image: envvars.png]
>>> I want to get all those environment variables. I am calling a bash
>>> script after env vars are set above. I have tried using linux'
>>> "/proc/<pid>/environ" which works successfully, but it gets other system
>>> process variables, that I would have to filter for, which can create a
>>> brittle deployment process, and comes with maintenance overhead.
>>>
>>> How do I extract those environment variables that Go CI/CD sets as
>>> pictured above?
>>>
>>> Thank you.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "go-cd" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/go-cd/e944146e-e37f-4316-839d-65a06dc4f003n%40googlegroups.com
>>> <https://groups.google.com/d/msgid/go-cd/e944146e-e37f-4316-839d-65a06dc4f003n%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "go-cd" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/go-cd/1b037e48-0990-4f1d-8535-6cdae7941b32n%40googlegroups.com
> <https://groups.google.com/d/msgid/go-cd/1b037e48-0990-4f1d-8535-6cdae7941b32n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/CAD9m7Cw3PmCVf66XFEGZAq_i5KzhA2ugdzTsMb2sZ%2BCDiAtfTQ%40mail.gmail.com.

Reply via email to