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
So that this role may be used unconditionally in jobs which may
or may not actually build images, skip the tasks if the
docker_images variable is undefined.
Change-Id: I6ef0c80230de628f86f523878020c82ce81a1e60
* In the build-image role, push to the buildset registry if it is defined.
* In the intermediate registry push and pull roles, ensure that the
buildset registry TLS cert is in place. This is a self-signed cert,
and so needs to be written for each run. This happens inside
bubblewrap where we have permission to write to /etc, which is an
ephemeral volume.
Change-Id: I47781d8a7adb93817dfe9266e2f4ad5fd829385c
The push-to-intermediate-registry role is meant to be used in the
post playbook of a job which most likely started the buildset
registry in its pre-playbook. The buildset_registry variable
is returned to zuul and therefore available to child jobs, but
not to further playbooks in this job. Therefore, load the variable
back in to memory here.
We may add this functionality directly to Zuul, in which case this
can be removed later.
Change-Id: I81899a9be92789fc1e5858f985eac41871b9d87a