Skip to content

Commit

Permalink
promoter: validate docker_login
Browse files Browse the repository at this point in the history
Implements workaround for docker_login bug which returns success even
when authentication fails.

ansible/ansible#32868

Includes note os we will be able to remove the workaround once we
get the ansible module fixed.

Change-Id: I875181cf6fca8ee99f822db16eae1a65cdeb74cb
  • Loading branch information
ssbarnea committed Oct 2, 2019
1 parent 92450e0 commit 2ff9791
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions ci-scripts/container-push/container-push.yml
Expand Up @@ -121,6 +121,17 @@
tags:
- rdoproject_push

# Workaround for https://github.com/ansible/ansible/issues/32868
- name: Validate rdoproject registry login
shell: >
docker build -t trunk.registry.rdoproject.org/{{ rdoproject_namespace }}/nop - &&
docker push trunk.registry.rdoproject.org/{{ rdoproject_namespace }}/nop
args:
stdin: |
FROM scratch
CMD touch foo
ENTRYPOINT ""
- name: Tag images to rdoproject registry with named label
shell: >
docker tag
Expand Down Expand Up @@ -148,6 +159,17 @@
tags:
- dockerhub_push

# Workaround for https://github.com/ansible/ansible/issues/32868
- name: Validate docker login
shell: >
docker build -t docker.io/{{ dockerhub_namespace }}/nop - &&
docker push docker.io/{{ dockerhub_namespace }}/nop
args:
stdin: |
FROM scratch
CMD touch foo
ENTRYPOINT ""
# Nested loop order here is on purpose, so we push first all the images with the full hash, then we tag with the named label.
- name: Tag and push images to docker hub
docker_image:
Expand Down

0 comments on commit 2ff9791

Please sign in to comment.