From 5fb2fb69d1eea8def90ef43883780b107f5257ea Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 12 Jul 2018 10:18:59 -0500 Subject: [PATCH] Add job for using pbrx to build container images The pbrx build-images command is directly applicable to any python project with pbr and bindep. Make a simple job that will run pbrx to produce images. Change-Id: Ica28f42bd0acc78a0e960ceef30e5e5045e8b389 --- .zuul.yaml | 8 ++++++++ playbooks/container-images/pre.yaml | 11 +++++++++++ playbooks/container-images/run.yaml | 10 ++++++++++ 3 files changed, 29 insertions(+) create mode 100644 playbooks/container-images/pre.yaml create mode 100644 playbooks/container-images/run.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 9db626e..0e863fb 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,3 +1,11 @@ +- job: + name: pbrx-build-container-images + nodeset: ubuntu-bionic + required-projects: + - openstack/pbrx + pre-run: playbooks/container-images/pre.yaml + run: playbooks/container-images/run.yaml + - project: check: jobs: diff --git a/playbooks/container-images/pre.yaml b/playbooks/container-images/pre.yaml new file mode 100644 index 0000000..6b28867 --- /dev/null +++ b/playbooks/container-images/pre.yaml @@ -0,0 +1,11 @@ +- hosts: all + roles: + + - install-docker + +- hosts: all + tasks: + + - name: Install pbrx software + command: python3 -m pip install src/git.openstack.org/openstack/pbrx + become: yes diff --git a/playbooks/container-images/run.yaml b/playbooks/container-images/run.yaml new file mode 100644 index 0000000..38c3119 --- /dev/null +++ b/playbooks/container-images/run.yaml @@ -0,0 +1,10 @@ +- hosts: all + tasks: + + - name: reset ssh connection to pick up docker group + meta: reset_connection + + - name: Build zuul container images + command: pbrx --debug build-images + args: + chdir: src/git.openstack.org/openstack-infra/zuul