Skip to content
Commits on Source (4)
......@@ -582,6 +582,11 @@ but will run tests against [`pre.gitlab.com`](https://pre.gitlab.com).
Note that [`pre.gitlab.com`](https://pre.gitlab.com) is used as an Interim
Performance Testbed and [will be replaced with the actual testbed in the future](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/60).
### `Test::Instance::Release`
This scenario functions the same as `Test::Instance::Staging`
but will run tests against [`release.gitlab.net`](https://release.gitlab.net).
### `Test::Instance::Smoke`
This scenario will run a limited amount of tests selected from the test suite tagged by `:smoke`.
......
......@@ -25,6 +25,7 @@ module Gitlab
autoload :Production, 'gitlab/qa/scenario/test/instance/production'
autoload :Smoke, 'gitlab/qa/scenario/test/instance/smoke'
autoload :Preprod, 'gitlab/qa/scenario/test/instance/preprod'
autoload :Release, 'gitlab/qa/scenario/test/instance/release'
autoload :Geo, 'gitlab/qa/scenario/test/instance/geo'
autoload :StagingGeo, 'gitlab/qa/scenario/test/instance/staging_geo'
end
......@@ -71,6 +72,7 @@ module Gitlab
autoload :Production, 'gitlab/qa/component/production'
autoload :Minio, 'gitlab/qa/component/minio'
autoload :Preprod, 'gitlab/qa/component/preprod'
autoload :Release, 'gitlab/qa/component/release'
autoload :Elasticsearch, 'gitlab/qa/component/elasticsearch'
autoload :MailHog, 'gitlab/qa/component/mail_hog'
autoload :Jira, 'gitlab/qa/component/jira'
......
......@@ -5,7 +5,6 @@ module Gitlab
include Scenario::Actable
ELASTIC_IMAGE = 'docker.elastic.co/elasticsearch/elasticsearch'.freeze
ELASTIC_IMAGE_TAG = '6.4.2'.freeze
attr_reader :docker
attr_accessor :environment, :network
......@@ -29,14 +28,14 @@ module Gitlab
end
def prepare
@docker.pull(ELASTIC_IMAGE, ELASTIC_IMAGE_TAG)
@docker.pull(ELASTIC_IMAGE, Runtime::Env.elastic_version)
return if @docker.network_exists?(network)
@docker.network_create(network)
end
def start
@docker.run(ELASTIC_IMAGE, ELASTIC_IMAGE_TAG) do |command|
@docker.run(ELASTIC_IMAGE, Runtime::Env.elastic_version) do |command|
command << "-d"
command << "--name #{name}"
command << "--net #{network}"
......
......@@ -53,7 +53,7 @@ module Gitlab
end
def release=(release)
@release = Release.new(release)
@release = QA::Release.new(release)
end
def name
......
require 'net/http'
require 'json'
require 'uri'
module Gitlab
module QA
module Component
class Release < Staging
ADDRESS = 'https://release.gitlab.net'.freeze
end
end
end
end
......@@ -25,7 +25,7 @@ module Gitlab
'login',
'--username gitlab-qa-bot',
%(--password "#{Runtime::Env.dev_access_token_variable}"),
Release::DEV_REGISTRY
QA::Release::DEV_REGISTRY
]
)
end
......
......@@ -10,7 +10,7 @@ module Gitlab
GEO_SECONDARY_ADDRESS = 'https://geo.staging.gitlab.com'.freeze
def self.release
Release.new(image)
QA::Release.new(image)
rescue Support::InvalidResponseError => ex
warn ex.message
warn "#{ex.response.code} #{ex.response.message}: #{ex.response.body}"
......@@ -78,7 +78,7 @@ module Gitlab
private
def official?
Release::DEV_OFFICIAL_TAG_REGEX.match?(version)
QA::Release::DEV_OFFICIAL_TAG_REGEX.match?(version)
end
def revision
......
......@@ -136,6 +136,10 @@ module Gitlab
@host_artifacts_dir ||= File.join(ENV['QA_ARTIFACTS_DIR'] || '/tmp/gitlab-qa', Runtime::Env.run_id)
end
def elastic_version
ENV['ELASTIC_VERSION'] || '6.4.2'.freeze
end
def variables
vars = {}
......
......@@ -18,7 +18,7 @@ module Gitlab
release = if release_name.nil? || release_name.start_with?('--')
deployment_component.release
else
Release.new(release_name)
QA::Release.new(release_name)
end
args.unshift(release_name) if release_name&.start_with?('--')
......
module Gitlab
module QA
module Scenario
module Test
module Instance
##
# Run test suite against release.gitlab.net
#
class Release < DeploymentBase
def deployment_component
Component::Release
end
end
end
end
end
end
end