File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,19 @@ namespace :qa do
30
30
desc "Push unstable or auto-deploy version of gitlab-{ce,ee}-qa to the GitLab registry"
31
31
task :staging do
32
32
Gitlab ::Util . section ( 'qa:push:staging' ) do
33
- tag = Build ::Check . is_auto_deploy? ? Build ::Info . major_minor_version_and_rails_ref : Build ::Info . gitlab_version
34
- Build ::QAImage . tag_and_push_to_gitlab_registry ( tag )
33
+ if Build ::Check . is_auto_deploy?
34
+ # Tag using both major.minor-railsref tag and just railsref tag.
35
+ # Temporary until gitlab-qa is changed to detect QA image tag from just railsref.
36
+ # https://gitlab.com/gitlab-org/gitlab-qa/-/issues/687
37
+ major_minor_version_and_rails_ref = Build ::Info . major_minor_version_and_rails_ref
38
+ rails_ref = major_minor_version_and_rails_ref . match ( /^(?<major>\d +)\. (?<minor>\d +)-(?<railsref>\w +)$/ ) [ 'railsref' ]
39
+
40
+ Build ::QAImage . tag_and_push_to_gitlab_registry ( major_minor_version_and_rails_ref )
41
+ Build ::QAImage . tag_and_push_to_gitlab_registry ( rails_ref )
42
+ else
43
+ Build ::QAImage . tag_and_push_to_gitlab_registry ( Build ::Info . gitlab_version )
44
+ end
45
+
35
46
Build ::QAImage . tag_and_push_to_gitlab_registry ( Build ::Info . commit_sha )
36
47
end
37
48
end
Original file line number Diff line number Diff line change 107
107
allow ( Build ::Info ) . to receive ( :current_git_tag ) . and_return ( '12.0.12345+5159f2949cb.59c9fa631' )
108
108
109
109
expect ( Build ::QAImage ) . to receive ( :tag_and_push_to_gitlab_registry ) . with ( '12.0-5159f2949cb' )
110
+ expect ( Build ::QAImage ) . to receive ( :tag_and_push_to_gitlab_registry ) . with ( '5159f2949cb' )
110
111
expect ( Build ::QAImage ) . to receive ( :tag_and_push_to_gitlab_registry ) . with ( commit_sha )
111
112
112
113
Rake ::Task [ 'qa:push:staging' ] . invoke
You can’t perform that action at this time.
0 commit comments