diff --git a/doc/source/container-roles.rst b/doc/source/container-roles.rst index d2d7a7f3f..ac334b032 100644 --- a/doc/source/container-roles.rst +++ b/doc/source/container-roles.rst @@ -9,6 +9,7 @@ Container Roles .. zuul:autorole:: install-kubernetes .. zuul:autorole:: install-openshift .. zuul:autorole:: install-podman +.. zuul:autorole:: pause-buildset-registry .. zuul:autorole:: promote-docker-image .. zuul:autorole:: pull-from-intermediate-registry .. zuul:autorole:: push-to-intermediate-registry diff --git a/roles/pause-buildset-registry/README.rst b/roles/pause-buildset-registry/README.rst new file mode 100644 index 000000000..695bb8858 --- /dev/null +++ b/roles/pause-buildset-registry/README.rst @@ -0,0 +1,10 @@ +Pause a buildset registry + +Utility role to pause a job providing a buildset registry. + +**Role Variables** + +.. zuul:rolevar:: buildset_registry + + Location of external buildset registry. If this is defined, + the job will not pause. diff --git a/roles/pause-buildset-registry/tasks/main.yaml b/roles/pause-buildset-registry/tasks/main.yaml new file mode 100644 index 000000000..e7c1a26fa --- /dev/null +++ b/roles/pause-buildset-registry/tasks/main.yaml @@ -0,0 +1,10 @@ +# If buildset_registry is defined, that means a parent job is running it; +# only if it is not defined does it mean that we are running it. If we +# are running it, pause the job so that child jobs will automatically +# use it. +- name: Pause the job + when: buildset_registry is not defined + zuul_return: + data: + zuul: + pause: true