Skip to content
代码片段 群组 项目
提交 c1d82f9b 编辑于 作者: Mark Lapierre's avatar Mark Lapierre
浏览文件

Merge branch '356232_adding_Runner_docker_variable_try_2' into 'master'

Adding env variable to enable parameterizing Runner Instance

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/125463



Merged-by: default avatarMark Lapierre <mlapierre@gitlab.com>
Approved-by: default avatarMark Lapierre <mlapierre@gitlab.com>
Reviewed-by: default avatarMark Lapierre <mlapierre@gitlab.com>
Co-authored-by: default avatarAndy Hohenner <ahohenner@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -562,6 +562,10 @@ def container_registry_host ...@@ -562,6 +562,10 @@ def container_registry_host
ENV.fetch('QA_CONTAINER_REGISTRY_HOST', 'registry.gitlab.com') ENV.fetch('QA_CONTAINER_REGISTRY_HOST', 'registry.gitlab.com')
end end
def runner_container_image
ENV.fetch('QA_RUNNER_CONTAINER_IMAGE', 'gitlab-runner:alpine')
end
# ENV variables for authenticating against a private container registry # ENV variables for authenticating against a private container registry
# These need to be set if using the # These need to be set if using the
# Service::DockerRun::Mixins::ThirdPartyDocker module # Service::DockerRun::Mixins::ThirdPartyDocker module
......
...@@ -16,7 +16,7 @@ class GitlabRunner < Base ...@@ -16,7 +16,7 @@ class GitlabRunner < Base
MSG MSG
def initialize(name) def initialize(name)
@image = "#{QA::Runtime::Env.container_registry_host}/gitlab-org/gitlab-runner:alpine" @image = "#{QA::Runtime::Env.container_registry_host}/gitlab-org/#{QA::Runtime::Env.runner_container_image}"
@name = name || "qa-runner-#{SecureRandom.hex(4)}" @name = name || "qa-runner-#{SecureRandom.hex(4)}"
@run_untagged = true @run_untagged = true
@executor = :shell @executor = :shell
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册