Tony Chemit
Tony Chemit

Reputation: 1205

How to get job variables injected into the docker execution?

I wonder if this is already part of the system... I need to use the current gitlab user id and email ($GITLAB_USER_ID, $GITLAB_USER_EMAIL) injected into the execution of the docker image (to later configure the git repository).

Is there a magic way to do this ? or should I explicitly write the export commands into my .gitlab-ci.yml file (as a before_script for example) ?

Thanks.

Upvotes: 0

Views: 854

Answers (1)

Tony Chemit
Tony Chemit

Reputation: 1205

I got my response by trying the env command on a build. So yes every job variables are available into the docker execution env.

Upvotes: 1

Related Questions