From 94b42b950e8957135c50967445de2ecdb7d05229 Mon Sep 17 00:00:00 2001 From: David Moreau-Simard Date: Wed, 6 Sep 2017 14:09:00 -0400 Subject: [PATCH] Add a 'base-minimal' job with it's set of playbooks The 'base-minimal' job has for purpose to be what we consider to be the smallest possible set of roles/tasks to be applied on nodes regardless of the job context. Inheriting from this minimal job provides the ability to run roles or tasks that would have otherwise been included by default only on a need basis. Change-Id: I5c255a6f9d2adb91fbc222742bd2249f126ca982 --- playbooks/base-minimal/README.rst | 8 ++++++++ playbooks/base-minimal/post-logs.yaml | 9 +++++++++ playbooks/base-minimal/post-ssh.yaml | 3 +++ playbooks/base-minimal/pre.yaml | 4 ++++ zuul.yaml | 23 +++++++++++++++++++++++ 5 files changed, 47 insertions(+) create mode 100644 playbooks/base-minimal/README.rst create mode 100644 playbooks/base-minimal/post-logs.yaml create mode 100644 playbooks/base-minimal/post-ssh.yaml create mode 100644 playbooks/base-minimal/pre.yaml diff --git a/playbooks/base-minimal/README.rst b/playbooks/base-minimal/README.rst new file mode 100644 index 0000000000..e7756a07fb --- /dev/null +++ b/playbooks/base-minimal/README.rst @@ -0,0 +1,8 @@ +base-minimal +------------ + +These playbooks are used to select a minimal subset of the roles included in +the base playbooks. + +It will do nothing else than what is explicitely necessary for any job to run +properly. diff --git a/playbooks/base-minimal/post-logs.yaml b/playbooks/base-minimal/post-logs.yaml new file mode 100644 index 0000000000..d67092cee6 --- /dev/null +++ b/playbooks/base-minimal/post-logs.yaml @@ -0,0 +1,9 @@ +- hosts: localhost + roles: + - role: add-fileserver + fileserver: "{{ site_logs }}" + +- hosts: "{{ site_logs.fqdn }}" + roles: + - role: upload-logs + zuul_log_url: "http://logs.openstack.org" diff --git a/playbooks/base-minimal/post-ssh.yaml b/playbooks/base-minimal/post-ssh.yaml new file mode 100644 index 0000000000..d793838ce6 --- /dev/null +++ b/playbooks/base-minimal/post-ssh.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - remove-build-sshkey diff --git a/playbooks/base-minimal/pre.yaml b/playbooks/base-minimal/pre.yaml new file mode 100644 index 0000000000..1b9c34d9e9 --- /dev/null +++ b/playbooks/base-minimal/pre.yaml @@ -0,0 +1,4 @@ +- hosts: all + roles: + - add-build-sshkey + - start-zuul-console diff --git a/zuul.yaml b/zuul.yaml index e344f66e6e..b05f98cf05 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -169,6 +169,29 @@ secrets: - site_logs +- job: + name: base-minimal + parent: null + description: | + A subset of what the 'base' job provides: the absolute minimum considered + required to run for any one job. + It doesn't set up cached git repositories, will not set up mirrors, + doesn't validate the node and does not generate an ARA report. + These tasks, if required, can be included by the dependant jobs + themselves on a need basis. + pre-run: playbooks/base-minimal/pre + post-run: + - playbooks/base-minimal/post-ssh + - playbooks/base-minimal/post-logs + roles: + - zuul: openstack-infra/zuul-jobs + timeout: 1800 + nodes: + - name: ubuntu-xenial + label: ubuntu-xenial + secrets: + - site_logs + - job: name: base-test parent: null