Skip to content

gitlab-runner exec to support envfile

Description

While running the gitlab-runner exec docker you can have the need to pass multiple environment variables to the inner docker run.

Proposal

The proposal is to add an option to pass an envfile inside the docker env like you can do with docker --env-file option.

At the moment to achieve the same result I have to run it like this that build a list of --env options.

gitlab-runner exec   docker $(cat env_local |cut -f 2 -d" "|sed 's/^/--env /g'|xargs) --docker-privileged test_examples

where env_local is a file like:

export TEST=foobar
export TEST1=foobar1

Links to related issues and merge requests / references

Please paste a link of the related issues or/and merge requests

Edited by Alessandro Surace