Skip to content

Make environment variables and pre/post scripts configurable in the Global level settings

Description

Currently, the environment and the pre/post scripts such as pre_get_sources_script are only configurable in the [[runners]] level.

However, depending on the environment in which Runners are running, these settings should be added to all runners so it requires copy-paste the same line to config.toml when every new runner is registered.

  • Runners are working behind the proxy so need to configure environment = ["http_proxy=$http_proxy", "https_proxy=$https_proxy", "no_proxy=docker,docker:2375,docker:2376"] for all runners.
  • Need to import a CA certificate with a script when every job runs.

Proposal

Make the following settings configurable in the Global level settings.

If no [[runners]] level settings are defined, global level settigns applied. And if [[runner]] level settings are defined, they override global settings.

  • environment
  • pre_get_sources_script
  • post_get_sources_script
  • pre_build_script
  • post_build_script

Links to related issues and merge requests / references