Sha256: cd4a81b88de2f84ac99b73c1cc279421162a1034130a1e4d3bdf6ffce8703240
Contents?: true
Size: 1.15 KB
Versions: 35
Compression:
Stored size: 1.15 KB
Contents
require 'securerandom' module Gitlab module QA module Component ## # This class represents GitLab QA specs image that is implemented in # the `qa/` directory located in GitLab CE / EE repositories. # class Specs < Scenario::Template attr_accessor :suite, :release, :network, :args def initialize @docker = Docker::Engine.new end def perform # rubocop:disable Metrics/AbcSize raise ArgumentError unless [suite, release].all? puts "Running test suite `#{suite}` for #{release.project_name}" name = "#{release.project_name}-qa-#{SecureRandom.hex(4)}" @docker.run(release.qa_image, release.qa_tag, suite, *args) do |command| command << "-t --rm --net=#{network || 'bridge'}" Runtime::Env.variables.each do |key, value| command.env(key, value) end command.volume('/var/run/docker.sock', '/var/run/docker.sock') command.volume(File.join(Runtime::Env.host_artifacts_dir, name), '/home/qa/tmp') command.name(name) end end end end end end
Version data entries
35 entries across 35 versions & 1 rubygems