From adc851b377cf0917f77a4dde52e8b4846e34984e Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Fri, 8 Mar 2019 12:53:42 -0800 Subject: [PATCH] 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 --- playbooks/buildset-registry/pre.yaml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/playbooks/buildset-registry/pre.yaml b/playbooks/buildset-registry/pre.yaml index bbf1de5..71043c9 100644 --- a/playbooks/buildset-registry/pre.yaml +++ b/playbooks/buildset-registry/pre.yaml @@ -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: