Don't try to push images when the build failed

When an image build fails we're still trying to push the image to
the registry. This isn't going to work, as there is no image to
push since the build failed.

Add a check for the job being in a success state for if we're
pushing images. This way we can properly report FAILURE instead of
POST_FAILURE.

Change-Id: Idba5c8997111c6e84b44bc970394b58387519666
This commit is contained in:
Monty Taylor 2019-07-27 11:31:09 -04:00
parent d480a536f2
commit 10cea0b22d

View File

@ -1,3 +1,5 @@
- name: Push images to intermediate registry - name: Push images to intermediate registry
when: docker_images is defined when:
- docker_images is defined
- zuul_success | default(true) | bool
include_tasks: push.yaml include_tasks: push.yaml