-
Notifications
You must be signed in to change notification settings - Fork 9
Expose runner environment variables to gitlab-runner installation scripts #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
if this feature request is accepted, i can come up with a PR implementing the changes |
I think Do you want to re-export all variables starting with |
essentially, yes |
SGTM. /cc @fkorotkov |
SGTM too |
* merge the various installation scripts into a single one * use text/template to render the actual script based on user/operator input * implement unit tests for test coverage of new feature closes cirruslabs#111
* merge the various installation scripts into a single one * use text/template to render the actual script based on user/operator input * implement unit tests for test coverage of new feature closes cirruslabs#111
* merge the various installation scripts into a single one * use text/template to render the actual script based on user/operator input * implement unit tests for test coverage of new feature closes cirruslabs#111
As part of the VM provisioning, the tart-executor installs gitlab-runner as it is one the of prerequisits for the build environment. tart-executor supports two strategies; downloading via
curl
orbrew
We use an internal homebrew cache in order to speed up the usage of
brew
as part of our CI environment. For this to work, we define HOMEBREW_ARTIFACT_DOMAIN and HOMEBREW_DOCKER_REGISTRY_TOKEN as executor environment variables. These variables are available throughout every custom executor stage but are not forwarded to any logic happening inside the VM; only the build stage receives them as gitlab-runner exposes them as part of the build script via a series ofexport
statements.In order for the gitlab-runner installation as part of the preparation phase to benefit from our internal cache, i would like to see the environment variables also forwarded to the installation script.
Another usecase could be the use of HTTP proxies. Assuming a build environment has restricted access to the internet, both the
curl
as well asbrew
installation would fail. In this case the runner would be provisioned withHTTP_PROXY
variables which would also be needed during the gitlab-runner installation step.The environment variables are already processed as part of the
gitlab.InitEnv()
function, but most of the values are discarded.ssh#Session.Setenv
setting the environment using Setenv for the installation script session would solve the issue
pro: the installation scripts must not be changed
contra: sshd might be configured to reject or/some environment variables
export
injecting the environment variables into the installation scripts would closely resemble the logic gitlab-runner does for the build stage.
pro: the sshd configuration has no impact on the functionality
contra: -
The text was updated successfully, but these errors were encountered: