In docker build jobs, run the registry if not running

Change the docker build jobs so that they only run a buildset registry
if one isn't already running.  That way the build-image job can be
used standalone (where it runs a registry on the build node) or as
part of a job graph (where it runs after a paused job which runs a
dedicated registry).

This means that all jobs which should benefit from a buildset or
intermediate registry should inherit from these, and they will
automatically push and pull as appropriate.

Change-Id: Ib5ffb4289bcb396b00e6d1e1d0d3358785dc9624
Depends-On: https://review.openstack.org/642150
This commit is contained in:
James E. Blair 2019-03-08 12:53:42 -08:00
parent b4de065593
commit adc851b377
1 changed files with 11 additions and 4 deletions

View File

@ -1,8 +1,15 @@
- hosts: all
roles:
- install-docker
- run-buildset-registry
- use-buildset-registry
tasks:
- name: Install docker
include_role:
name: install-docker
- name: Run buildset registry (if not already running)
when: buildset_registry is not defined
include_role:
name: run-buildset-registry
- name: Use buildset registry
include_role:
name: use-buildset-registry
- hosts: localhost
roles: