From 44836d8f02b4517720221603c42d6c6582d0096b Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Tue, 27 Jun 2017 15:57:39 -0700 Subject: [PATCH] Move base job to project-config This needs to be a trusted job because of the way we are performing log copying. Move it to this repo, which is trusted. Change-Id: I6781923f08b39cfb6778ae581e0dea3b51ea31c4 Depends-On: Id12fb552f81e7eda9992694250582823be2c1a3c --- playbooks/base/post.yaml | 17 +++++++++++++++++ playbooks/base/pre.yaml | 4 ++++ zuul.yaml | 26 ++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100644 playbooks/base/post.yaml create mode 100644 playbooks/base/pre.yaml diff --git a/playbooks/base/post.yaml b/playbooks/base/post.yaml new file mode 100644 index 0000000000..5359d4d7b4 --- /dev/null +++ b/playbooks/base/post.yaml @@ -0,0 +1,17 @@ +- hosts: all + roles: + - collect-logs +--- +- hosts: localhost + tasks: + - name: Add log server ssh key. + command: ssh-add /var/lib/zuul/ssh/static_id_rsa + + - name: Add log server to inventory. + add_host: + name: static.openstack.org + groups: zuul_logserver +--- +- hosts: zuul_logserver + roles: + - upload-logs diff --git a/playbooks/base/pre.yaml b/playbooks/base/pre.yaml new file mode 100644 index 0000000000..dc68b97755 --- /dev/null +++ b/playbooks/base/pre.yaml @@ -0,0 +1,4 @@ +- hosts: all + roles: + - prepare-workspace + - openstack-info diff --git a/zuul.yaml b/zuul.yaml index 3056ebcb32..a5eea261cb 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -13,6 +13,32 @@ gerrit: verified: -1 +- job: + name: base + description: | + The base job for OpenStack's installation of Zuul. + + All jobs ultimately inherit from this. It runs a pre-playbook + which copies all of the job's prepared git repos on to all of + the nodes in the nodeset. It runs a post-playbook which copies + all of the files in the logs/ directory of every node on to the + logserver. + + It also sets default timeout and nodeset values (which may be + overidden). + pre-run: base/pre + post-run: base/post + roles: + - zuul: openstack-infra/openstack-zuul-roles + success-url: http://logs.openstack.org/{change.number[:-2]}/{change.number}/{change.patchset}/{pipeline.name}/{buildset.uuid}/ + failure-url: http://logs.openstack.org/{change.number[:-2]}/{change.number}/{change.patchset}/{pipeline.name}/{buildset.uuid}/ + timeout: 1800 + vars: + zuul_workspace_root: /home/zuul + nodes: + - name: ubuntu-xenial + label: ubuntu-xenial + - project: name: openstack-infra/openstack-zuul-jobs check: