tagging an image with two tags in docker hub and openshift

23 Views Asked by At

I'm trying to tag an image with the latest tag and a version tag in my ci, I'm using the following commands:

oc new-build . --name=$app-$version_tag --strategy=docker --to=$registry/$organization/$image_name:$version --push-secret=$REGISTRY_TOKEN --to-docker
oc tag $registry/$organization/$image_name:$image_tag $image_name:$CI_COMMIT_TAG

and while the first command does also upload the image to my docker hub, the second command only adds the tag to the image stream, but doesn't push it to docker hub.

I tried using --reference-policy=local flag, and tried even making the first command twice but it didn't work

0

There are 0 best solutions below