Commit Graph

7 Commits

Author SHA1 Message Date
Ian Wienand d1e74606bc
push-to-intermediate-registry: look for container_images variable
When used with the container-image roles, the variable is
container_images, not docker_images.

Change-Id: I074f9523aea7d71879f722b88ff7c3e7e45fb90f
2023-03-24 10:35:35 +11:00
Monty Taylor 10cea0b22d 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
2019-07-28 14:07:47 -04:00
James E. Blair cbff0cc355 push-to-registry: handle undefined docker_images
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
2019-02-19 17:49:21 -08:00
James E. Blair 71b7cb0ae5 Update docker image roles
* 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
2019-02-16 10:02:48 -08:00
James E. Blair 404ff1d97b Load buildset registry data from zuul_return
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
2019-02-15 10:33:36 -08:00
James E. Blair 582e95db53 Enable logging on registry/push/pull jobs
This may expose credentials, but these don't work right now.

Change-Id: I8b55734d17329ecc6ac9d9a9ad4189482b6c07ee
2019-02-14 12:59:29 -08:00
James E. Blair 8efc1cf1af Add intermediate registry push/pull roles
Change-Id: Ie2554005f924d2736d1f1fd1c51cfd5ca9e09199
Depends-On: https://review.openstack.org/634825
2019-02-11 17:41:30 -08:00