gitlab-qa 8.4.2 → 8.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +0 -12
- data/Gemfile.lock +1 -1
- data/exe/gitlab-qa +1 -1
- data/lib/gitlab/qa/component/base.rb +2 -2
- data/lib/gitlab/qa/component/gitlab.rb +1 -1
- data/lib/gitlab/qa/component/staging.rb +17 -35
- data/lib/gitlab/qa/component/suggested_reviewer.rb +47 -0
- data/lib/gitlab/qa/docker/command.rb +3 -14
- data/lib/gitlab/qa/docker/engine.rb +1 -1
- data/lib/gitlab/qa/release.rb +6 -2
- data/lib/gitlab/qa/report/find_set_dri.rb +43 -0
- data/lib/gitlab/qa/report/gitlab_issue_client.rb +7 -0
- data/lib/gitlab/qa/report/relate_failure_issue.rb +16 -0
- data/lib/gitlab/qa/report/results_reporter_shared.rb +1 -1
- data/lib/gitlab/qa/report/test_result.rb +8 -0
- data/lib/gitlab/qa/runtime/env.rb +5 -14
- data/lib/gitlab/qa/scenario/test/integration/suggested_reviewer.rb +62 -0
- data/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb +1 -1
- data/lib/gitlab/qa/service/cluster_provider/base.rb +33 -0
- data/lib/gitlab/qa/service/cluster_provider/k3d.rb +141 -0
- data/lib/gitlab/qa/service/kubernetes_cluster.rb +62 -0
- data/lib/gitlab/qa/support/shell_command.rb +98 -0
- data/lib/gitlab/qa/support/shellout.rb +16 -0
- data/lib/gitlab/qa/version.rb +1 -1
- data/lib/gitlab/qa.rb +0 -1
- data/support/manifests/suggested_reviewer/authenticator.yaml +41 -0
- data/support/manifests/suggested_reviewer/postgres.yaml +84 -0
- data/support/manifests/suggested_reviewer/pubsub.yaml +41 -0
- data/support/manifests/suggested_reviewer/recommender-bot.yaml +242 -0
- data/support/manifests/suggested_reviewer/recommender.yaml +52 -0
- metadata +15 -7
- data/lib/gitlab/qa/component/internet_tunnel.rb +0 -76
- data/lib/gitlab/qa/docker/shellout.rb +0 -77
- data/lib/gitlab/qa/scenario/test/integration/kubernetes.rb +0 -56
- data/lib/gitlab/qa/scenario/test/integration/ssh_tunnel.rb +0 -56
- data/lib/gitlab/qa/support/dev_ee_qa_image.rb +0 -54
@@ -1,54 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'json'
|
4
|
-
require 'uri'
|
5
|
-
|
6
|
-
module Gitlab
|
7
|
-
module QA
|
8
|
-
module Support
|
9
|
-
class DevEEQAImage
|
10
|
-
attr_reader :base_url
|
11
|
-
|
12
|
-
DEV_ADDRESS = 'https://dev.gitlab.org'
|
13
|
-
GITLAB_EE_QA_REPOSITORY_ID = 55
|
14
|
-
QAImageNotFoundError = Class.new(StandardError)
|
15
|
-
|
16
|
-
def initialize
|
17
|
-
@base_url = "#{DEV_ADDRESS}/api/v4/projects/gitlab%2Fomnibus-gitlab/registry/repositories/#{GITLAB_EE_QA_REPOSITORY_ID}/tags?per_page=100"
|
18
|
-
|
19
|
-
Runtime::Env.require_qa_dev_access_token!
|
20
|
-
end
|
21
|
-
|
22
|
-
def retrieve_image_from_container_registry!(revision)
|
23
|
-
request_url = base_url
|
24
|
-
|
25
|
-
begin
|
26
|
-
response = api_get!(URI.parse(request_url))
|
27
|
-
tags = JSON.parse(response.body)
|
28
|
-
|
29
|
-
matching_qa_image_tag = find_matching_qa_image_tag(tags, revision)
|
30
|
-
return matching_qa_image_tag['location'] if matching_qa_image_tag
|
31
|
-
|
32
|
-
request_url = next_page_url_from_response(response)
|
33
|
-
end while request_url
|
34
|
-
|
35
|
-
raise QAImageNotFoundError, "No `gitlab-ee-qa` image could be found for the revision `#{revision}`."
|
36
|
-
end
|
37
|
-
|
38
|
-
private
|
39
|
-
|
40
|
-
def api_get!(uri)
|
41
|
-
Support::GetRequest.new(uri, Runtime::Env.qa_dev_access_token).execute!
|
42
|
-
end
|
43
|
-
|
44
|
-
def next_page_url_from_response(response)
|
45
|
-
response['x-next-page'].to_s != '' ? "#{base_url}&page=#{response['x-next-page']}" : nil
|
46
|
-
end
|
47
|
-
|
48
|
-
def find_matching_qa_image_tag(tags, revision)
|
49
|
-
tags.find { |tag| tag['name'].end_with?(revision) }
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|