Skip to content
Snippets Groups Projects
Commit 3b511659 authored by Balasankar 'Balu' C's avatar Balasankar 'Balu' C
Browse files

Merge branch 'tag-stable-staging-docker-images' into 'master'

Tag docker images from staging builds with CI_COMMIT_REF_SLUG also

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7380



Merged-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: default avatarNailia Iskhakova <niskhakova@gitlab.com>
parents fd569b44 81c14d93
No related branches found
No related tags found
3 merge requests!122heptapod#1474: making 1.3 the new oldstable,!121heptapod#1448: making Heptapod 1.3 the stable series,!120Merge upstream first commit of the 16-9-stable branch
......@@ -28,6 +28,10 @@
task :staging do
Gitlab::Util.section('docker:push:staging') do
Build::GitlabImage.tag_and_push_to_gitlab_registry(Build::Info::Docker.tag)
# Also tag with CI_COMMIT_REF_SLUG so that manual testing using Docker
# can use the same image name/tag.
Build::GitlabImage.tag_and_push_to_gitlab_registry(Build::Info::CI.commit_ref_slug)
end
end
......
......@@ -55,6 +55,7 @@
allow(ENV).to receive(:[]).and_call_original
allow(ENV).to receive(:[]).with('CI_REGISTRY_IMAGE').and_return('dev.gitlab.org:5005/gitlab/omnibus-gitlab')
allow(ENV).to receive(:[]).with('CI_COMMIT_REF_SLUG').and_return('foo-bar')
allow(Build::Info::Package).to receive(:name).and_return('gitlab-ce')
allow(Build::Info::Docker).to receive(:tag).and_return('9.0.0')
allow(DockerOperations).to receive(:authenticate).and_return(true)
......@@ -65,6 +66,7 @@
it 'pushes to staging correctly' do
expect(dummy_image).to receive(:push).with(dummy_creds, repo_tag: 'dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ce:9.0.0')
expect(dummy_image).to receive(:push).with(dummy_creds, repo_tag: 'dev.gitlab.org:5005/gitlab/omnibus-gitlab/gitlab-ce:foo-bar')
Rake::Task['docker:push:staging'].invoke
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment