File tree Expand file tree Collapse file tree 5 files changed +15
-7
lines changed Expand file tree Collapse file tree 5 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ def common_vars
75
75
def qa_trigger_vars
76
76
%W[
77
77
QA_RELEASE=#{ Build ::GitlabImage . gitlab_registry_image_address ( tag : Build ::Info ::Docker . tag ) }
78
- QA_IMAGE=#{ Build ::Info . qa_image }
78
+ QA_IMAGE=#{ Build ::Info :: QA . image }
79
79
QA_TESTS=#{ Gitlab ::Util . get_env ( 'QA_TESTS' ) }
80
80
ALLURE_JOB_NAME=#{ allure_job_name } -#{ Build ::Info ::Package . edition }
81
81
GITLAB_SEMVER_VERSION=#{ Build ::Info ::Git . latest_stable_tag . tr ( '+' , '-' ) }
Original file line number Diff line number Diff line change @@ -15,10 +15,6 @@ class Info
15
15
} . freeze
16
16
17
17
class << self
18
- def qa_image
19
- Gitlab ::Util . get_env ( 'QA_IMAGE' ) || "#{ Gitlab ::Util . get_env ( 'CI_REGISTRY' ) } /#{ Build ::Info ::Components ::GitLabRails . project_path } /#{ Build ::Info ::Package . name } -qa:#{ Build ::Info ::Components ::GitLabRails . ref ( prepend_version : false ) } "
20
- end
21
-
22
18
def gcp_release_bucket
23
19
# All tagged builds are pushed to the release bucket
24
20
# whereas regular branch builds use a separate one
Original file line number Diff line number Diff line change
1
+ module Build
2
+ class Info
3
+ class QA
4
+ class << self
5
+ def image
6
+ Gitlab ::Util . get_env ( 'QA_IMAGE' ) || "#{ Gitlab ::Util . get_env ( 'CI_REGISTRY' ) } /#{ Build ::Info ::Components ::GitLabRails . project_path } /#{ Build ::Info ::Package . name } -qa:#{ Build ::Info ::Components ::GitLabRails . ref ( prepend_version : false ) } "
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
Original file line number Diff line number Diff line change 1
1
require_relative 'image'
2
+ require_relative 'info/qa'
2
3
require_relative 'gitlab_image'
3
4
require_relative '../skopeo_helper'
4
5
@@ -15,7 +16,7 @@ def self.gitlab_registry_image_name
15
16
end
16
17
17
18
def self . copy_image_to_dockerhub ( final_tag )
18
- source = Build ::Info . qa_image
19
+ source = Build ::Info :: QA . image
19
20
target = "#{ dockerhub_image_name } :#{ final_tag } "
20
21
21
22
SkopeoHelper . login ( 'gitlab-ci-token' , Gitlab ::Util . get_env ( 'CI_JOB_TOKEN' ) , Gitlab ::Util . get_env ( 'CI_REGISTRY' ) )
Original file line number Diff line number Diff line change 30
30
31
31
describe '.copy_image_to_dockerhub' do
32
32
before do
33
- allow ( Build ::Info ) . to receive ( :qa_image ) . and_return ( 'registry.gitlab.com/gitlab-org/gitlab/gitlab-ce-qa:1234567890' )
33
+ allow ( Build ::Info :: QA ) . to receive ( :image ) . and_return ( 'registry.gitlab.com/gitlab-org/gitlab/gitlab-ce-qa:1234567890' )
34
34
35
35
allow ( SkopeoHelper ) . to receive ( :login ) . and_return ( true )
36
36
allow ( SkopeoHelper ) . to receive ( :copy_image ) . and_return ( true )
You can’t perform that action at this time.
0 commit comments