diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-01-23 12:04:01 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2018-01-23 12:04:01 +0100 |
commit | 5cb94835c0010d1954b26c858f910d533cd88e38 (patch) | |
tree | 5a1ff0ad9838bd70dbb7ca5fc1376c58aacc95b1 /qa/qa/service | |
parent | 738bad8ee83932ffd1b7b4de9113b0152b37172a (diff) | |
download | gitlab-ce-5cb94835c0010d1954b26c858f910d533cd88e38.tar.gz |
Refactor QA instance test scenario and tags
Diffstat (limited to 'qa/qa/service')
-rw-r--r-- | qa/qa/service/runner.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/qa/qa/service/runner.rb b/qa/qa/service/runner.rb index 2e313b59d28..d0ee33c69f2 100644 --- a/qa/qa/service/runner.rb +++ b/qa/qa/service/runner.rb @@ -11,6 +11,8 @@ module QA def initialize(name) @image = 'gitlab/gitlab-runner:alpine' @name = name || "qa-runner-#{SecureRandom.hex(4)}" + @network = Runtime::Scenario.attributes[:network] || 'test' + @tags = %w[qa test] end def pull @@ -18,18 +20,14 @@ module QA end def register! - ## - # TODO, this assumes that `test` network exists, because we know that - # gitlab-qa environment orchestration tool creates it. - # shell <<~CMD.tr("\n", ' ') docker run -d --rm --entrypoint=/bin/sh - --network test --name #{@name} + --network #{@network} --name #{@name} -e CI_SERVER_URL=#{@address} -e REGISTER_NON_INTERACTIVE=true -e REGISTRATION_TOKEN=#{@token} -e RUNNER_EXECUTOR=shell - -e RUNNER_TAG_LIST=#{@tags.to_a.join(',')} + -e RUNNER_TAG_LIST=#{@tags.join(',')} -e RUNNER_NAME=#{@name} #{@image} -c 'gitlab-runner register && gitlab-runner run' CMD |