Sha256: 00db291955b91c20ea8cb1de871b1dc4bde372f3a70f77d3a5f3cfb62db63e84

Contents?: true

Size: 1.47 KB

Versions: 9

Compression:

Stored size: 1.47 KB

Contents

module Gitlab
  module QA
    module Scenario
      module Test
        module Instance
          ##
          # Base class to be used to define deployment environment scenarios
          #
          class DeploymentBase < Scenario::Template
            def perform(release_name = nil, *args)
              Runtime::Env.require_no_license!

              release = if release_name.nil? || release_name.start_with?('--')
                          deployment_component.release
                        else
                          Release.new(release_name)
                        end

              args.unshift(release_name) if release_name&.start_with?('--')

              if release.dev_gitlab_org?
                Docker::Command.execute(
                  [
                    'login',
                    '--username gitlab-qa-bot',
                    %(--password "#{Runtime::Env.dev_access_token_variable}"),
                    Release::DEV_REGISTRY
                  ]
                )
              end

              Component::Specs.perform do |specs|
                specs.suite = 'Test::Instance::All'
                specs.release = release
                specs.args = [deployment_component::ADDRESS, *args]
              end
            end

            def deployment_component
              raise NotImplementedError, 'Please define the Component for the deployment environment associated with this scenario.'
            end
          end
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gitlab-qa-4.3.3 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.3.2 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.2.2 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.2.1 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.2.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.1.0 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.0.5 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.0.4 lib/gitlab/qa/scenario/test/instance/deployment_base.rb
gitlab-qa-4.0.3 lib/gitlab/qa/scenario/test/instance/deployment_base.rb