From 6b245770eced99960d384a58292252d15648e335 Mon Sep 17 00:00:00 2001 From: Carlos Camacho Date: Tue, 2 Apr 2019 15:05:50 +0200 Subject: [PATCH] Allow running a no-op validation The idea here is to be able to run a validation called np-op in order to test the framework in the CI. Also we should create a group validation called no-op running only this validation. Change-Id: Ied6eaa4009d624737d2dfac8a61f3a273537ce13 --- doc/source/_exts/generate_validations_doc.py | 2 +- doc/source/readme.rst | 5 ++++ playbooks/no-op.yaml | 12 +++++++++ roles/no-op/meta/main.yml | 27 ++++++++++++++++++++ roles/no-op/tasks/main.yml | 4 +++ roles/no-op/vars/main.yml | 8 ++++++ 6 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 playbooks/no-op.yaml create mode 100644 roles/no-op/meta/main.yml create mode 100644 roles/no-op/tasks/main.yml create mode 100644 roles/no-op/vars/main.yml diff --git a/doc/source/_exts/generate_validations_doc.py b/doc/source/_exts/generate_validations_doc.py index f379a3f28..0e0ced900 100644 --- a/doc/source/_exts/generate_validations_doc.py +++ b/doc/source/_exts/generate_validations_doc.py @@ -96,7 +96,7 @@ def build_detail(group, validations): def setup(app): # Seed it with the known groups: - groups = set(('prep', 'pre-introspection', + groups = set(('no-op', 'prep', 'pre-introspection', 'pre-deployment', 'post-deployment', 'pre-update', 'pre-upgrade', 'post-upgrade', 'openshift-on-openstack')) diff --git a/doc/source/readme.rst b/doc/source/readme.rst index ec3e32619..c84170f83 100644 --- a/doc/source/readme.rst +++ b/doc/source/readme.rst @@ -42,6 +42,11 @@ the deployment stage they're should be run on. Validations can belong to multiple groups. +No op +~~~~ + +A validation doing nothing for testing the framework + Prep ~~~~ diff --git a/playbooks/no-op.yaml b/playbooks/no-op.yaml new file mode 100644 index 000000000..9db33e975 --- /dev/null +++ b/playbooks/no-op.yaml @@ -0,0 +1,12 @@ +--- +- hosts: undercloud, overcloud + vars: + metadata: + name: NO-OP validation + description: > + A simple validation doing nothing in order to test that + the validations framework works. + groups: + - no-op + roles: + - no-op diff --git a/roles/no-op/meta/main.yml b/roles/no-op/meta/main.yml new file mode 100644 index 000000000..b3d5ccc9f --- /dev/null +++ b/roles/no-op/meta/main.yml @@ -0,0 +1,27 @@ +galaxy_info: + author: TripleO Validations Team + company: Red Hat + license: Apache + min_ansible_version: 2.4 + + platforms: + - name: CentOS + versions: + - 7 + - name: RHEL + versions: + - 7 + + categories: + - cloud + - baremetal + - system + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] diff --git a/roles/no-op/tasks/main.yml b/roles/no-op/tasks/main.yml new file mode 100644 index 000000000..904ba2099 --- /dev/null +++ b/roles/no-op/tasks/main.yml @@ -0,0 +1,4 @@ +--- +- name: Run a no-op validation everywhere + debug: + msg: "This is a no-op action for testing that the validations framework runs" diff --git a/roles/no-op/vars/main.yml b/roles/no-op/vars/main.yml new file mode 100644 index 000000000..4202d355f --- /dev/null +++ b/roles/no-op/vars/main.yml @@ -0,0 +1,8 @@ +--- +metadata: + name: NO-OP validation + description: > + A simple validation doing nothing in order to test that + the validations framework works. + groups: + - no-op