Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
remove -f flag on docker tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bparees committed Oct 28, 2016
1 parent a2bf2d9 commit a7852de
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/vagrant-openshift/action/push_openshift_images.rb
Expand Up @@ -47,9 +47,9 @@ def push_image(centos_namespace,rhel_namespace,image_name, git_ref, registry)
git_ref=$(git rev-parse --short HEAD)
echo "Pushing image #{image_name}:#{git_ref}..."
docker tag -f #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:#{git_ref}
docker tag -f #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:latest
docker tag -f #{centos_namespace}/#{image_name}-centos7 docker.io/#{centos_namespace}/#{image_name}-centos7:latest
docker tag #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:#{git_ref}
docker tag #{centos_namespace}/#{image_name}-centos7 #{registry}#{centos_namespace}/#{image_name}-centos7:latest
docker tag #{centos_namespace}/#{image_name}-centos7 docker.io/#{centos_namespace}/#{image_name}-centos7:latest
# We can't fully parallelize this because docker fails when you push to the same repo at the
# same time (using different tags), so we do two groups of push operations.
Expand All @@ -73,8 +73,8 @@ def push_image(centos_namespace,rhel_namespace,image_name, git_ref, registry)
docker push #{registry}#{centos_namespace}/#{image_name}-centos7:latest
if [ #{rhel_namespace} != "SKIP" ]; then
docker tag -f #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}
docker tag -f #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:latest
docker tag #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}
docker tag #{rhel_namespace}/#{image_name}-rhel7 #{registry}#{rhel_namespace}/#{image_name}-rhel7:latest
# this one is failing when done in parallel for unknown reasons
docker push #{registry}#{rhel_namespace}/#{image_name}-rhel7:#{git_ref}
Expand Down Expand Up @@ -136,9 +136,9 @@ def call(env)
set +e
echo "Pre-pulling base images ..."
docker pull #{@options[:registry]}openshift/base-centos7
[[ "$?" == "0" ]] && docker tag -f #{@options[:registry]}openshift/base-centos7 openshift/base-centos7
[[ "$?" == "0" ]] && docker tag #{@options[:registry]}openshift/base-centos7 openshift/base-centos7
docker pull #{@options[:registry]}openshift/base-rhel7
[[ "$?" == "0" ]] && docker tag -f #{@options[:registry]}openshift/base-rhel7 openshift/base-rhel7
[[ "$?" == "0" ]] && docker tag #{@options[:registry]}openshift/base-rhel7 openshift/base-rhel7
}

cmd += %{
Expand Down

0 comments on commit a7852de

Please sign in to comment.