From 10aa1b543288155600bbf8b5c5dfd2936ab20822 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 27 Jun 2019 13:42:52 -0700 Subject: [PATCH] Add a simple test of the install-nodejs role Change-Id: Ib0e5e3ffa418827746317d0bdf6196a7b38fc0db --- doc/source/test-jobs.rst | 1 + test-playbooks/simple-role-test.yaml | 5 +++++ zuul.d/test-js-roles-jobs.yaml | 11 +++++++++++ 3 files changed, 17 insertions(+) create mode 100644 test-playbooks/simple-role-test.yaml create mode 100644 zuul.d/test-js-roles-jobs.yaml diff --git a/doc/source/test-jobs.rst b/doc/source/test-jobs.rst index f4fb74a4d..cb2c7c874 100644 --- a/doc/source/test-jobs.rst +++ b/doc/source/test-jobs.rst @@ -6,4 +6,5 @@ repository. They are not meant for general consumption and are only expected to be run by the OpenDev Zuul. Generally you can ignore these unless you are making changes to the roles in this repository. +.. zuul:autojob:: zuul-jobs-test-install-nodejs .. zuul:autojob:: zuul-jobs-test-registry diff --git a/test-playbooks/simple-role-test.yaml b/test-playbooks/simple-role-test.yaml new file mode 100644 index 000000000..d07246971 --- /dev/null +++ b/test-playbooks/simple-role-test.yaml @@ -0,0 +1,5 @@ +- hosts: all + tasks: + - name: Include tested role + include_role: + name: "{{ role_name }}" diff --git a/zuul.d/test-js-roles-jobs.yaml b/zuul.d/test-js-roles-jobs.yaml new file mode 100644 index 000000000..e48c41057 --- /dev/null +++ b/zuul.d/test-js-roles-jobs.yaml @@ -0,0 +1,11 @@ +# Jobs which test roles listed in js-roles.rst + +- job: + name: zuul-jobs-test-install-nodejs + description: Test the install-nodejs role + files: + - roles/install-nodejs/.* + run: + test-playbooks/simple-role-test.yaml + vars: + role_name: install-nodejs