commit 30c3733a56f1c4bdcaf616011bbffebff9f39692 Author: Gael Chamoulaud (Strider) Date: Tue Oct 6 13:59:09 2020 +0200 Switch legacy Zuul jobs to native Zuul v3 jobs See [1] for more details. [1] https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html Signed-off-by: Gael Chamoulaud (Strider) Change-Id: I387d0dbf1956250d43652c59b4748611439acff5 diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..d77b8b4 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,370 @@ +--- +- job: + description: Base tripleo-validations job + name: tripleo-validations-centos-8-base + nodeset: centos-8 + parent: base + success-url: "reports.html" + failure-url: "reports.html" + pre-run: + - tests/prepare-test-host.yml + - ci/playbooks/pre.yml + run: + - ci/playbooks/run.yml + timeout: 1800 + voting: true + +- project: + templates: + - tripleo-multinode-container-minimal + - openstack-python3-victoria-jobs + - tripleo-validations-molecule-jobs + - check-requirements + - openstack-lower-constraints-jobs + - release-notes-jobs-python3 + check: + jobs: + - openstack-tox-linters: &tripleo-linters + nodeset: centos-8 + - openstack-tox-docs: &tripleo-docs + files: + - ^doc/.* + - ^molecule-requirements.txt + - ^requirements.txt + - ^README.rst + - tripleo-ci-centos-8-scenario004-standalone: &standalone0004 + dependencies: &deps + - openstack-tox-linters + files: + - ^roles/ceph.*$ + gate: + jobs: + - openstack-tox-linters + - openstack-tox-docs: *tripleo-docs + - tripleo-ci-centos-8-scenario004-standalone: *standalone0004 + promote: + jobs: + - promote-openstack-tox-docs: *tripleo-docs + +- project-template: + check: + jobs: + - tripleo-validations-centos-8-molecule-ceph + - tripleo-validations-centos-8-molecule-check_network_gateway + - tripleo-validations-centos-8-molecule-controller_token + - tripleo-validations-centos-8-molecule-controller_ulimits + - tripleo-validations-centos-8-molecule-ctlplane_ip_range + - tripleo-validations-centos-8-molecule-image_serve + - tripleo-validations-centos-8-molecule-nova_status + - tripleo-validations-centos-8-molecule-nova_svirt + - tripleo-validations-centos-8-molecule-package_version + - tripleo-validations-centos-8-molecule-rabbitmq_limits + - tripleo-validations-centos-8-molecule-repos + - tripleo-validations-centos-8-molecule-stonith_exists + - tripleo-validations-centos-8-molecule-system_encoding + - tripleo-validations-centos-8-molecule-tls_everywhere + - tripleo-validations-centos-8-molecule-undercloud_debug + - tripleo-validations-centos-8-molecule-undercloud_heat_purge_deleted + - tripleo-validations-centos-8-molecule-undercloud_tokenflush + - tripleo-validations-centos-8-molecule-check_kernel_version + gate: + jobs: + - tripleo-validations-centos-8-molecule-ceph + - tripleo-validations-centos-8-molecule-check_network_gateway + - tripleo-validations-centos-8-molecule-controller_token + - tripleo-validations-centos-8-molecule-controller_ulimits + - tripleo-validations-centos-8-molecule-ctlplane_ip_range + - tripleo-validations-centos-8-molecule-image_serve + - tripleo-validations-centos-8-molecule-nova_status + - tripleo-validations-centos-8-molecule-nova_svirt + - tripleo-validations-centos-8-molecule-package_version + - tripleo-validations-centos-8-molecule-rabbitmq_limits + - tripleo-validations-centos-8-molecule-repos + - tripleo-validations-centos-8-molecule-stonith_exists + - tripleo-validations-centos-8-molecule-system_encoding + - tripleo-validations-centos-8-molecule-tls_everywhere + - tripleo-validations-centos-8-molecule-undercloud_debug + - tripleo-validations-centos-8-molecule-undercloud_heat_purge_deleted + - tripleo-validations-centos-8-molecule-undercloud_tokenflush + - tripleo-validations-centos-8-molecule-check_kernel_version + name: tripleo-validations-molecule-jobs +- job: + files: + - ^roles/collect_flavors_and_verify_profiles/.* + name: tripleo-validations-centos-8-molecule-collect_flavors_and_verify_profiles + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: collect_flavors_and_verify_profiles + voting: false +- job: + files: + - ^roles/ceilometerdb_size/.* + name: tripleo-validations-centos-8-molecule-ceilometerdb_size + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: ceilometerdb_size + voting: false +- job: + files: + - ^roles/neutron_sanity_check/.* + name: tripleo-validations-centos-8-molecule-neutron_sanity_check + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: neutron_sanity_check + voting: false +- job: + files: + - ^roles/node_health/.* + name: tripleo-validations-centos-8-molecule-node_health + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: node_health + voting: false +- job: + files: + - ^roles/nova_event_callback/.* + name: tripleo-validations-centos-8-molecule-nova_event_callback + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: nova_event_callback + voting: false +- job: + files: + - ^roles/ovs_dpdk_pmd/.* + name: tripleo-validations-centos-8-molecule-ovs_dpdk_pmd + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: ovs_dpdk_pmd + voting: false +- job: + files: + - ^roles/pacemaker_status/.* + name: tripleo-validations-centos-8-molecule-pacemaker_status + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: pacemaker_status + voting: false +- job: + files: + - ^roles/stack_health/.* + name: tripleo-validations-centos-8-molecule-stack_health + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: stack_health + voting: false +- job: + files: + - ^roles/switch_vlans/.* + name: tripleo-validations-centos-8-molecule-switch_vlans + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: switch_vlans + voting: false +- job: + files: + - ^roles/tls_everywhere/.* + name: tripleo-validations-centos-8-molecule-tls_everywhere + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: tls_everywhere + voting: true +- job: + files: + - ^roles/undercloud_process_count/.* + name: tripleo-validations-centos-8-molecule-undercloud_process_count + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: undercloud_process_count + voting: false +- job: + files: + - ^roles/openstack_endpoints/.* + name: tripleo-validations-centos-8-molecule-openstack_endpoints + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: openstack_endpoints + voting: false +- job: + files: + - ^roles/openshift_on_openstack/.* + name: tripleo-validations-centos-8-molecule-openshift_on_openstack + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: openshift_on_openstack + voting: false +- job: + files: + - ^roles/node_disks/.* + name: tripleo-validations-centos-8-molecule-node_disks + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: node_disks + voting: false +- job: + files: + - ^roles/container_status/.* + name: tripleo-validations-centos-8-molecule-container_status + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: container_status + voting: false +- job: + files: + - ^roles/healthcheck_service_status/.* + name: tripleo-validations-centos-8-molecule-healthcheck_service_status + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: healthcheck_service_status + voting: false +- job: + files: + - ^roles/ironic_boot_configuration/.* + name: tripleo-validations-centos-8-molecule-ironic_boot_configuration + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: ironic_boot_configuration + voting: false +- job: + files: + - ^roles/mysql_open_files_limit/.* + name: tripleo-validations-centos-8-molecule-mysql_open_files_limit + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: mysql_open_files_limit + voting: false +- job: + files: + - ^roles/network_environment/.* + name: tripleo-validations-centos-8-molecule-network_environment + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: network_environment + voting: false +- job: + files: + - ^roles/dhcp_validations/.* + name: tripleo-validations-centos-8-molecule-dhcp_validations + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: dhcp_validations + voting: false +- job: + files: + - ^roles/controller_token/.* + name: tripleo-validations-centos-8-molecule-controller_token + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: controller_token +- job: + files: + - ^roles/controller_ulimits/.* + name: tripleo-validations-centos-8-molecule-controller_ulimits + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: controller_ulimits +- job: + files: + - ^roles/ctlplane_ip_range/.* + name: tripleo-validations-centos-8-molecule-ctlplane_ip_range + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: ctlplane_ip_range +- job: + files: + - ^roles/repos/.* + name: tripleo-validations-centos-8-molecule-repos + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: repos +- job: + files: + - ^roles/undercloud_debug/.* + name: tripleo-validations-centos-8-molecule-undercloud_debug + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: undercloud_debug +- job: + files: + - ^roles/nova_status/.* + name: tripleo-validations-centos-8-molecule-nova_status + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: nova_status +- job: + files: + - ^roles/image_serve/.* + name: tripleo-validations-centos-8-molecule-image_serve + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: image_serve +- job: + files: + - ^roles/check_network_gateway/.* + name: tripleo-validations-centos-8-molecule-check_network_gateway + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: check_network_gateway + voting: false +- job: + files: + - ^roles/undercloud_heat_purge_deleted/.* + name: tripleo-validations-centos-8-molecule-undercloud_heat_purge_deleted + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: undercloud_heat_purge_deleted +- job: + files: + - ^roles/undercloud_tokenflush/.* + name: tripleo-validations-centos-8-molecule-undercloud_tokenflush + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: undercloud_tokenflush +- job: + files: + - ^roles/rabbitmq_limits/.* + name: tripleo-validations-centos-8-molecule-rabbitmq_limits + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: rabbitmq_limits +- job: + files: + - ^roles/stonith_exists/.* + name: tripleo-validations-centos-8-molecule-stonith_exists + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: stonith_exists +- job: + files: + - ^roles/ceph/.* + name: tripleo-validations-centos-8-molecule-ceph + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: ceph +- job: + files: + - ^roles/system_encoding/.* + name: tripleo-validations-centos-8-molecule-system_encoding + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: system_encoding +- job: + files: + - ^roles/nova_svirt/.* + name: tripleo-validations-centos-8-molecule-nova_svirt + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: nova_svirt +- job: + files: + - ^roles/package_version/.* + name: tripleo-validations-centos-8-molecule-package_version + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: package_version +- job: + files: + - ^roles/check_kernel_version/.* + name: tripleo-validations-centos-8-molecule-check_kernel_version + parent: tripleo-validations-centos-8-base + vars: + tripleo_validations_role_name: check_kernel_version diff --git a/_skeleton_role_/molecule/default/molecule.yml b/_skeleton_role_/molecule/default/molecule.yml index 106126d..693274e 100644 --- a/_skeleton_role_/molecule/default/molecule.yml +++ b/_skeleton_role_/molecule/default/molecule.yml @@ -33,7 +33,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/ansible-role-requirements.yml b/ansible-role-requirements.yml deleted file mode 100644 index b07642f..0000000 --- a/ansible-role-requirements.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# Copyright 2019 Red Hat, Inc. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -- name: tripleo-ansible - scm: git - src: https://opendev.org/openstack/tripleo-ansible - version: master - trackbranch: master diff --git a/ci/playbooks/pre.yml b/ci/playbooks/pre.yml new file mode 100644 index 0000000..8d42096 --- /dev/null +++ b/ci/playbooks/pre.yml @@ -0,0 +1,44 @@ +--- +- hosts: all + pre_tasks: + - name: Ensure output dirs + file: + path: "{{ ansible_user_dir }}/zuul-output/logs" + state: directory + + - name: Ensure virtualenv is available + include_role: + name: ensure-virtualenv + + - name: Setup bindep + pip: + name: "bindep" + virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_site_packages: true + + - name: Run bindep + shell: |- + . {{ ansible_user_dir }}/test-python/bin/activate + {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/scripts/bindep-install + become: true + changed_when: false + + - name: Setup test-python + pip: + requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule-requirements.txt" + virtualenv: "{{ ansible_user_dir }}/test-python" + virtualenv_site_packages: true + + tasks: + - name: Get necessary git repos + git: + repo: https://opendev.org/openstack/{{ item }} + dest: "{{ ansible_user_dir}}/{{ zuul.project.src_dir }}/roles/roles.galaxy/{{ item }}" + version: master + force: true + with_items: + - tripleo-ansible + - validations-common + + roles: + - role: ensure-docker diff --git a/ci/playbooks/run-local.yml b/ci/playbooks/run-local.yml new file mode 100644 index 0000000..cd0f83e --- /dev/null +++ b/ci/playbooks/run-local.yml @@ -0,0 +1,13 @@ +--- +- hosts: all + tasks: + - name: set basic zuul fact + set_fact: + zuul: + project: + src_dir: "{{ tripleo_src }}" + ansible_connection: ssh + +- import_playbook: pre.yml + +- import_playbook: run.yml diff --git a/ci/playbooks/run.yml b/ci/playbooks/run.yml new file mode 100644 index 0000000..7945ce8 --- /dev/null +++ b/ci/playbooks/run.yml @@ -0,0 +1,42 @@ +--- + +- hosts: all + environment: + ANSIBLE_LOG_PATH: "{{ ansible_user_dir }}/zuul-output/logs/ansible-execution.log" + pre_tasks: + + - name: Set project path fact + set_fact: + tripleo_validations_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-validations'].src_dir }}" + + - name: Set roles path fact + set_fact: + tripleo_validations_roles_paths: + - "{{ tripleo_validations_project_path }}/roles/roles.galaxy/tripleo-ansible/tripleo_ansible/roles" + - "{{ tripleo_validations_project_path }}/roles/roles.galaxy/validations-common/validations_common/roles" + - "{{ tripleo_validations_project_path }}/roles" + - "/usr/share/ansible/roles" + + - name: Set library path fact + set_fact: + tripleo_validations_library_paths: + - "{{ tripleo_validations_project_path }}/roles/roles.galaxy/validations-common/validations_common/library" + - "{{ tripleo_validations_project_path }}/library" + - "/usr/share/ansible/library" + + tasks: + - name: Run role test job + shell: |- + . {{ ansible_user_dir }}/test-python/bin/activate + . {{ tripleo_validations_project_path }}/ansible-test-env.rc + pytest --color=no \ + --html={{ ansible_user_dir }}/zuul-output/logs/reports.html \ + --self-contained-html \ + --ansible-args='{{ tripleo_job_ansible_args | default("") }}' \ + {{ tripleo_validations_project_path }}/tests/test_molecule.py + args: + chdir: "{{ tripleo_validations_project_path }}/roles/{{ tripleo_validations_role_name }}" + executable: /bin/bash + environment: + ANSIBLE_ROLES_PATH: "{{ tripleo_validations_roles_paths | join(':') }}" + ANSIBLE_LIBRARY: "{{ tripleo_validations_library_paths | join(':') }}" diff --git a/roles/ceph/molecule/ceph-ansible-installed/molecule.yml b/roles/ceph/molecule/ceph-ansible-installed/molecule.yml index 1718806..48af576 100644 --- a/roles/ceph/molecule/ceph-ansible-installed/molecule.yml +++ b/roles/ceph/molecule/ceph-ansible-installed/molecule.yml @@ -33,7 +33,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: name: ceph-ansible-installed diff --git a/roles/ceph/molecule/default/molecule.yml b/roles/ceph/molecule/default/molecule.yml index 2b09d56..add947a 100644 --- a/roles/ceph/molecule/default/molecule.yml +++ b/roles/ceph/molecule/default/molecule.yml @@ -27,7 +27,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/check_network_gateway/molecule/default/molecule.yml b/roles/check_network_gateway/molecule/default/molecule.yml index a799215..c9fc37e 100644 --- a/roles/check_network_gateway/molecule/default/molecule.yml +++ b/roles/check_network_gateway/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/controller_token/molecule/default/molecule.yml b/roles/controller_token/molecule/default/molecule.yml index 42c3997..e236e96 100644 --- a/roles/controller_token/molecule/default/molecule.yml +++ b/roles/controller_token/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/controller_ulimits/molecule/default/molecule.yml b/roles/controller_ulimits/molecule/default/molecule.yml index 0320d5a..243e3e7 100644 --- a/roles/controller_ulimits/molecule/default/molecule.yml +++ b/roles/controller_ulimits/molecule/default/molecule.yml @@ -34,6 +34,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/ctlplane_ip_range/molecule/default/molecule.yml b/roles/ctlplane_ip_range/molecule/default/molecule.yml index ca4d02b..ec0f2c6 100644 --- a/roles/ctlplane_ip_range/molecule/default/molecule.yml +++ b/roles/ctlplane_ip_range/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/image_serve/molecule/default/molecule.yml b/roles/image_serve/molecule/default/molecule.yml index 0eb863c..81a1b9d 100644 --- a/roles/image_serve/molecule/default/molecule.yml +++ b/roles/image_serve/molecule/default/molecule.yml @@ -41,8 +41,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: ../../../../library - ANSIBLE_ROLES_PATH: ../../../../roles/roles.galaxy/tripleo-ansible/tripleo-ansible/tripleo_ansible/roles + ANSIBLE_ROLES_PATH: ../../../../roles/roles.galaxy/tripleo-ansible/tripleo_ansible/roles scenario: test_sequence: diff --git a/roles/nova_status/molecule/default/molecule.yml b/roles/nova_status/molecule/default/molecule.yml index 42c3997..e236e96 100644 --- a/roles/nova_status/molecule/default/molecule.yml +++ b/roles/nova_status/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/tls_everywhere/molecule/default/molecule.yml b/roles/tls_everywhere/molecule/default/molecule.yml index 980916a..005f423 100644 --- a/roles/tls_everywhere/molecule/default/molecule.yml +++ b/roles/tls_everywhere/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/undercloud_debug/molecule/default/molecule.yml b/roles/undercloud_debug/molecule/default/molecule.yml index 42c3997..e236e96 100644 --- a/roles/undercloud_debug/molecule/default/molecule.yml +++ b/roles/undercloud_debug/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml b/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml index 6138aef..532c523 100644 --- a/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml +++ b/roles/undercloud_heat_purge_deleted/molecule/default/molecule.yml @@ -35,7 +35,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/undercloud_process_count/molecule/default/molecule.yml b/roles/undercloud_process_count/molecule/default/molecule.yml index 980916a..005f423 100644 --- a/roles/undercloud_process_count/molecule/default/molecule.yml +++ b/roles/undercloud_process_count/molecule/default/molecule.yml @@ -31,7 +31,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/undercloud_tokenflush/molecule/default/molecule.yml b/roles/undercloud_tokenflush/molecule/default/molecule.yml index 6138aef..532c523 100644 --- a/roles/undercloud_tokenflush/molecule/default/molecule.yml +++ b/roles/undercloud_tokenflush/molecule/default/molecule.yml @@ -35,7 +35,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml b/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml index 6138aef..532c523 100644 --- a/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml +++ b/roles/undercloud_tokenflush/molecule/non-persistent-token-format/molecule.yml @@ -35,7 +35,7 @@ provisioner: log: true env: ANSIBLE_STDOUT_CALLBACK: yaml - ANSIBLE_LIBRARY: "../../../../library" + ANSIBLE_LIBRARY: "../../../../library:../../../../roles/roles.galaxy/validations-common/validations_common/library" scenario: test_sequence: diff --git a/scripts/run-local-test b/scripts/run-local-test index 6f7a49d..9f4d469 100755 --- a/scripts/run-local-test +++ b/scripts/run-local-test @@ -67,4 +67,4 @@ ansible-playbook -i "${PROJECT_DIR}/tests/hosts.ini" \ -e "ansible_user=${USER}" \ -e "ansible_user_dir=${HOME}" \ "${PROJECT_DIR}/tests/prepare-test-host.yml" \ - "${PROJECT_DIR}/zuul.d/playbooks/run-local.yml" + "${PROJECT_DIR}/ci/playbooks/run-local.yml" diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml deleted file mode 100644 index a3c60ff..0000000 --- a/zuul.d/base.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -- job: - description: Base tripleo-validations job - name: tripleo-validations-centos-8-base - nodeset: centos-8 - parent: base - success-url: "reports.html" - failure-url: "reports.html" - pre-run: - - tests/prepare-test-host.yml - - zuul.d/playbooks/pre.yml - run: - - zuul.d/playbooks/run.yml - timeout: 1800 - voting: true diff --git a/zuul.d/layout.yaml b/zuul.d/layout.yaml deleted file mode 100644 index d473d70..0000000 --- a/zuul.d/layout.yaml +++ /dev/null @@ -1,31 +0,0 @@ -- project: - templates: - - tripleo-multinode-container-minimal - - openstack-python3-victoria-jobs - - tripleo-validations-molecule-jobs - - check-requirements - - release-notes-jobs-python3 - check: - jobs: - - openstack-tox-linters - - openstack-tox-docs: &tripleo-docs - files: - - ^doc/.* - - ^README.rst - - openstack-tox-lower-constraints - - tripleo-ci-centos-8-scenario004-standalone: - dependencies: &deps - - openstack-tox-linters - files: - - ^roles/ceph.*$ - gate: - jobs: - - openstack-tox-linters - - openstack-tox-docs: *tripleo-docs - - openstack-tox-lower-constraints - - tripleo-ci-centos-8-scenario004-standalone: - files: - - ^roles/ceph.*$ - promote: - jobs: - - promote-openstack-tox-docs: *tripleo-docs diff --git a/zuul.d/molecule.yaml b/zuul.d/molecule.yaml deleted file mode 100644 index 1657e42..0000000 --- a/zuul.d/molecule.yaml +++ /dev/null @@ -1,325 +0,0 @@ ---- -- project-template: - check: - jobs: - - tripleo-validations-centos-8-molecule-ceph - - tripleo-validations-centos-8-molecule-check_network_gateway - - tripleo-validations-centos-8-molecule-controller_token - - tripleo-validations-centos-8-molecule-controller_ulimits - - tripleo-validations-centos-8-molecule-ctlplane_ip_range - - tripleo-validations-centos-8-molecule-image_serve - - tripleo-validations-centos-8-molecule-nova_status - - tripleo-validations-centos-8-molecule-nova_svirt - - tripleo-validations-centos-8-molecule-package_version - - tripleo-validations-centos-8-molecule-rabbitmq_limits - - tripleo-validations-centos-8-molecule-repos - - tripleo-validations-centos-8-molecule-stonith_exists - - tripleo-validations-centos-8-molecule-system_encoding - - tripleo-validations-centos-8-molecule-tls_everywhere - - tripleo-validations-centos-8-molecule-undercloud_cpu - - tripleo-validations-centos-8-molecule-undercloud_debug - - tripleo-validations-centos-8-molecule-undercloud_heat_purge_deleted - - tripleo-validations-centos-8-molecule-undercloud_tokenflush - - tripleo-validations-centos-8-molecule-check_kernel_version - gate: - jobs: - - tripleo-validations-centos-8-molecule-ceph - - tripleo-validations-centos-8-molecule-check_network_gateway - - tripleo-validations-centos-8-molecule-controller_token - - tripleo-validations-centos-8-molecule-controller_ulimits - - tripleo-validations-centos-8-molecule-ctlplane_ip_range - - tripleo-validations-centos-8-molecule-image_serve - - tripleo-validations-centos-8-molecule-nova_status - - tripleo-validations-centos-8-molecule-nova_svirt - - tripleo-validations-centos-8-molecule-package_version - - tripleo-validations-centos-8-molecule-rabbitmq_limits - - tripleo-validations-centos-8-molecule-repos - - tripleo-validations-centos-8-molecule-stonith_exists - - tripleo-validations-centos-8-molecule-system_encoding - - tripleo-validations-centos-8-molecule-tls_everywhere - - tripleo-validations-centos-8-molecule-undercloud_cpu - - tripleo-validations-centos-8-molecule-undercloud_debug - - tripleo-validations-centos-8-molecule-undercloud_heat_purge_deleted - - tripleo-validations-centos-8-molecule-undercloud_tokenflush - - tripleo-validations-centos-8-molecule-check_kernel_version - name: tripleo-validations-molecule-jobs -- job: - files: - - ^roles/collect_flavors_and_verify_profiles/.* - name: tripleo-validations-centos-8-molecule-collect_flavors_and_verify_profiles - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: collect_flavors_and_verify_profiles - voting: false -- job: - files: - - ^roles/ceilometerdb_size/.* - name: tripleo-validations-centos-8-molecule-ceilometerdb_size - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: ceilometerdb_size - voting: false -- job: - files: - - ^roles/neutron_sanity_check/.* - name: tripleo-validations-centos-8-molecule-neutron_sanity_check - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: neutron_sanity_check - voting: false -- job: - files: - - ^roles/node_health/.* - name: tripleo-validations-centos-8-molecule-node_health - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: node_health - voting: false -- job: - files: - - ^roles/nova_event_callback/.* - name: tripleo-validations-centos-8-molecule-nova_event_callback - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: nova_event_callback - voting: false -- job: - files: - - ^roles/ovs_dpdk_pmd/.* - name: tripleo-validations-centos-8-molecule-ovs_dpdk_pmd - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: ovs_dpdk_pmd - voting: false -- job: - files: - - ^roles/pacemaker_status/.* - name: tripleo-validations-centos-8-molecule-pacemaker_status - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: pacemaker_status - voting: false -- job: - files: - - ^roles/stack_health/.* - name: tripleo-validations-centos-8-molecule-stack_health - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: stack_health - voting: false -- job: - files: - - ^roles/switch_vlans/.* - name: tripleo-validations-centos-8-molecule-switch_vlans - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: switch_vlans - voting: false -- job: - files: - - ^roles/tls_everywhere/.* - name: tripleo-validations-centos-8-molecule-tls_everywhere - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: tls_everywhere - voting: true -- job: - files: - - ^roles/undercloud_process_count/.* - name: tripleo-validations-centos-8-molecule-undercloud_process_count - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: undercloud_process_count - voting: false -- job: - files: - - ^roles/openstack_endpoints/.* - name: tripleo-validations-centos-8-molecule-openstack_endpoints - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: openstack_endpoints - voting: false -- job: - files: - - ^roles/openshift_on_openstack/.* - name: tripleo-validations-centos-8-molecule-openshift_on_openstack - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: openshift_on_openstack - voting: false -- job: - files: - - ^roles/node_disks/.* - name: tripleo-validations-centos-8-molecule-node_disks - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: node_disks - voting: false -- job: - files: - - ^roles/container_status/.* - name: tripleo-validations-centos-8-molecule-container_status - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: container_status - voting: false -- job: - files: - - ^roles/healthcheck_service_status/.* - name: tripleo-validations-centos-8-molecule-healthcheck_service_status - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: healthcheck_service_status - voting: false -- job: - files: - - ^roles/ironic_boot_configuration/.* - name: tripleo-validations-centos-8-molecule-ironic_boot_configuration - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: ironic_boot_configuration - voting: false -- job: - files: - - ^roles/mysql_open_files_limit/.* - name: tripleo-validations-centos-8-molecule-mysql_open_files_limit - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: mysql_open_files_limit - voting: false -- job: - files: - - ^roles/network_environment/.* - name: tripleo-validations-centos-8-molecule-network_environment - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: network_environment - voting: false -- job: - files: - - ^roles/dhcp_validations/.* - name: tripleo-validations-centos-8-molecule-dhcp_validations - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: dhcp_validations - voting: false -- job: - files: - - ^roles/controller_token/.* - name: tripleo-validations-centos-8-molecule-controller_token - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: controller_token -- job: - files: - - ^roles/controller_ulimits/.* - name: tripleo-validations-centos-8-molecule-controller_ulimits - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: controller_ulimits -- job: - files: - - ^roles/ctlplane_ip_range/.* - name: tripleo-validations-centos-8-molecule-ctlplane_ip_range - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: ctlplane_ip_range -- job: - files: - - ^roles/repos/.* - name: tripleo-validations-centos-8-molecule-repos - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: repos -- job: - files: - - ^roles/undercloud_debug/.* - name: tripleo-validations-centos-8-molecule-undercloud_debug - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: undercloud_debug -- job: - files: - - ^roles/nova_status/.* - name: tripleo-validations-centos-8-molecule-nova_status - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: nova_status -- job: - files: - - ^roles/image_serve/.* - name: tripleo-validations-centos-8-molecule-image_serve - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: image_serve -- job: - files: - - ^roles/check_network_gateway/.* - name: tripleo-validations-centos-8-molecule-check_network_gateway - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: check_network_gateway - voting: false -- job: - files: - - ^roles/undercloud_heat_purge_deleted/.* - name: tripleo-validations-centos-8-molecule-undercloud_heat_purge_deleted - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: undercloud_heat_purge_deleted -- job: - files: - - ^roles/undercloud_tokenflush/.* - name: tripleo-validations-centos-8-molecule-undercloud_tokenflush - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: undercloud_tokenflush -- job: - files: - - ^roles/rabbitmq_limits/.* - name: tripleo-validations-centos-8-molecule-rabbitmq_limits - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: rabbitmq_limits -- job: - files: - - ^roles/stonith_exists/.* - name: tripleo-validations-centos-8-molecule-stonith_exists - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: stonith_exists -- job: - files: - - ^roles/ceph/.* - name: tripleo-validations-centos-8-molecule-ceph - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: ceph -- job: - files: - - ^roles/system_encoding/.* - name: tripleo-validations-centos-8-molecule-system_encoding - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: system_encoding -- job: - files: - - ^roles/nova_svirt/.* - name: tripleo-validations-centos-8-molecule-nova_svirt - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: nova_svirt -- job: - files: - - ^roles/package_version/.* - name: tripleo-validations-centos-8-molecule-package_version - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: package_version -- job: - files: - - ^roles/check_kernel_version/.* - name: tripleo-validations-centos-8-molecule-check_kernel_version - parent: tripleo-validations-centos-8-base - vars: - tripleo_validations_role_name: check_kernel_version diff --git a/zuul.d/playbooks/pre.yml b/zuul.d/playbooks/pre.yml deleted file mode 100644 index 92c21c7..0000000 --- a/zuul.d/playbooks/pre.yml +++ /dev/null @@ -1,42 +0,0 @@ ---- -- hosts: all - pre_tasks: - - name: Ensure output dirs - file: - path: "{{ ansible_user_dir }}/zuul-output/logs" - state: directory - - - name: Ensure virtualenv is available - include_role: - name: ensure-virtualenv - - - name: Setup bindep - pip: - name: "bindep" - virtualenv: "{{ ansible_user_dir }}/test-python" - virtualenv_site_packages: true - - - name: Run bindep - shell: |- - . {{ ansible_user_dir }}/test-python/bin/activate - {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/scripts/bindep-install - become: true - changed_when: false - - - name: Setup test-python - pip: - requirements: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule-requirements.txt" - virtualenv: "{{ ansible_user_dir }}/test-python" - virtualenv_site_packages: true - - tasks: - - name: Get Ansible Galaxy roles - command: >- - {{ ansible_user_dir }}/test-python/bin/ansible-galaxy install - -fr - {{ ansible_user_dir }}/{{ zuul.project.src_dir }}/ansible-role-requirements.yml - environment: - ANSIBLE_ROLES_PATH: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/roles/roles.galaxy" - - roles: - - role: ensure-docker diff --git a/zuul.d/playbooks/run-local.yml b/zuul.d/playbooks/run-local.yml deleted file mode 100644 index cd0f83e..0000000 --- a/zuul.d/playbooks/run-local.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -- hosts: all - tasks: - - name: set basic zuul fact - set_fact: - zuul: - project: - src_dir: "{{ tripleo_src }}" - ansible_connection: ssh - -- import_playbook: pre.yml - -- import_playbook: run.yml diff --git a/zuul.d/playbooks/run.yml b/zuul.d/playbooks/run.yml deleted file mode 100644 index a82b781..0000000 --- a/zuul.d/playbooks/run.yml +++ /dev/null @@ -1,34 +0,0 @@ ---- - -- hosts: all - environment: - ANSIBLE_LOG_PATH: "{{ ansible_user_dir }}/zuul-output/logs/ansible-execution.log" - pre_tasks: - - - name: Set project path fact - set_fact: - tripleo_validations_project_path: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/tripleo-validations'].src_dir }}" - - - name: Set role path fact - set_fact: - tripleo_validations_roles_paths: - - "{{ tripleo_validations_project_path }}/roles/roles.galaxy/tripleo-ansible/tripleo_ansible/roles" - - "{{ tripleo_validations_project_path }}/roles/roles.galaxy/tripleo-ansible/tripleo-ansible/tripleo_ansible/roles" - - "{{ tripleo_validations_project_path }}/roles" - - "/usr/share/ansible/roles" - - tasks: - - name: Run role test job - shell: |- - . {{ ansible_user_dir }}/test-python/bin/activate - . {{ tripleo_validations_project_path }}/ansible-test-env.rc - pytest --color=no \ - --html={{ ansible_user_dir }}/zuul-output/logs/reports.html \ - --self-contained-html \ - --ansible-args='{{ tripleo_job_ansible_args | default("") }}' \ - {{ tripleo_validations_project_path }}/tests/test_molecule.py - args: - chdir: "{{ tripleo_validations_project_path }}/roles/{{ tripleo_validations_role_name }}" - executable: /bin/bash - environment: - ANSIBLE_ROLE_PATH: "{{ tripleo_validations_roles_paths | join(':') }}"