From 326f902710e7f6a41c01b2bdedd7ac512196e5fa Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Fri, 13 Mar 2020 10:51:15 +0000 Subject: [PATCH] Finalize centos-8 migration - assure all jobs are using centos-8 - fixed broken role-addition caused by partial centos-8 migration - assure that touching molecule.yaml file tests role-addition, so we avoid future regressions Change-Id: I18dfce4ef4d8c3bd3b73b2447fc6807047186f61 --- doc/source/contributing.rst | 8 +-- role-addition.yml | 7 ++- zuul.d/base.yaml | 6 --- zuul.d/molecule.yaml | 104 +++++++++++++++++++++++++----------- 4 files changed, 83 insertions(+), 42 deletions(-) mode change 100644 => 100755 role-addition.yml diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst index d3607744b..561ca39f3 100644 --- a/doc/source/contributing.rst +++ b/doc/source/contributing.rst @@ -22,8 +22,8 @@ When the role is ready for CI, add a **job** entry into the - job: files: - ^tripleo_ansible/roles/${NEWROLENAME}/.* - name: tripleo-ansible-centos-7-molecule-${NEWROLENAME} - parent: tripleo-ansible-centos-7-base + name: tripleo-ansible-centos-8-molecule-${NEWROLENAME} + parent: tripleo-ansible-centos-8-base vars: tox_envlist: mol-${NEWROLENAME} @@ -36,10 +36,10 @@ of the `molecule.yaml` file. - project: check: jobs: - - tripleo-ansible-centos-7-molecule-${NEWROLENAME} + - tripleo-ansible-centos-8-molecule-${NEWROLENAME} gate: jobs: - - tripleo-ansible-centos-7-molecule-${NEWROLENAME} + - tripleo-ansible-centos-8-molecule-${NEWROLENAME} Finally add a role documentation file at diff --git a/role-addition.yml b/role-addition.yml old mode 100644 new mode 100755 index 3ea7a2a4a..0572b19b7 --- a/role-addition.yml +++ b/role-addition.yml @@ -1,3 +1,4 @@ +#!/usr/bin/env ansible-playbook --- # Copyright 2019 Red Hat, Inc. # All Rights Reserved. @@ -46,10 +47,12 @@ - name: Create molecule entry copy: content: |- + # Managed via ./role-addition.yml, do not edit manually without testing that + # new role addition does not reformat it. --- {% set items = molecule_yaml['content'] | b64decode | from_yaml %} {% set job_index = [] %} - {% set new_job_name = "tripleo-ansible-centos-7-molecule-" ~ _role_name %} + {% set new_job_name = "tripleo-ansible-centos-8-molecule-" ~ _role_name %} {% for item in items %} {% if 'project-template' in item %} {% if item['project-template']['name'] == "tripleo-ansible-molecule-jobs" %} @@ -73,7 +76,7 @@ {% if (job_index | length) < 1 %} {% set new_job = { "name": new_job_name, - "parent": "tripleo-ansible-centos-7-base", + "parent": "tripleo-ansible-centos-8-base", "files": [ "^tripleo_ansible/roles/" ~ _role_name ~ "/.*" ], diff --git a/zuul.d/base.yaml b/zuul.d/base.yaml index be156f2ed..5694ad70c 100644 --- a/zuul.d/base.yaml +++ b/zuul.d/base.yaml @@ -13,9 +13,3 @@ - zuul.d/playbooks/run.yml timeout: 1800 voting: true - -- job: - description: Old base tripleo-ansible job [DEPRECATED] - name: tripleo-ansible-centos-7-base - nodeset: centos-7 - parent: tripleo-ansible-centos-8-base diff --git a/zuul.d/molecule.yaml b/zuul.d/molecule.yaml index 4558da04d..9baecbeaa 100644 --- a/zuul.d/molecule.yaml +++ b/zuul.d/molecule.yaml @@ -1,23 +1,24 @@ +# Managed via ./role-addition.yml, do not edit manually without testing that +# new role addition does not reformat it. --- - project-template: check: - jobs: &jobs + jobs: - tripleo-ansible-centos-8-molecule-aide - tripleo-ansible-centos-8-molecule-backup_and_restore - tripleo-ansible-centos-8-molecule-login_defs - tripleo-ansible-centos-8-molecule-test_deps - tripleo-ansible-centos-8-molecule-test_package_action + - tripleo-ansible-centos-8-molecule-tripleo-modules - tripleo-ansible-centos-8-molecule-tripleo_bootstrap - tripleo-ansible-centos-8-molecule-tripleo_cellv2 - - tripleo-ansible-centos-7-molecule-tripleo_ceph_run_ansible: - # See https://bugs.launchpad.net/tripleo/+bug/1867012 - voting: false + - tripleo-ansible-centos-8-molecule-tripleo_ceph_run_ansible - tripleo-ansible-centos-8-molecule-tripleo_clients_install - tripleo-ansible-centos-8-molecule-tripleo_config - tripleo-ansible-centos-8-molecule-tripleo_container_image_prepare - - tripleo-ansible-centos-7-molecule-tripleo_container_manage - - tripleo-ansible-centos-7-molecule-tripleo_container_rm - - tripleo-ansible-centos-7-molecule-tripleo_container_stop + - tripleo-ansible-centos-8-molecule-tripleo_container_manage + - tripleo-ansible-centos-8-molecule-tripleo_container_rm + - tripleo-ansible-centos-8-molecule-tripleo_container_stop - tripleo-ansible-centos-8-molecule-tripleo_container_tag - tripleo-ansible-centos-8-molecule-tripleo_create_admin - tripleo-ansible-centos-8-molecule-tripleo_firewall @@ -27,7 +28,6 @@ - tripleo-ansible-centos-8-molecule-tripleo_kernel - tripleo-ansible-centos-8-molecule-tripleo_keystone_resources - tripleo-ansible-centos-8-molecule-tripleo_module_load - - tripleo-ansible-centos-8-molecule-tripleo-modules - tripleo-ansible-centos-8-molecule-tripleo_nova_image_cache - tripleo-ansible-centos-8-molecule-tripleo_ovs_dpdk - tripleo-ansible-centos-8-molecule-tripleo_packages @@ -52,15 +52,59 @@ - tripleo-ansible-centos-8-molecule-login_defs - tripleo-ansible-centos-8-molecule-test_deps - tripleo-ansible-centos-8-molecule-test_package_action + - tripleo-ansible-centos-8-molecule-tripleo-modules - tripleo-ansible-centos-8-molecule-tripleo_bootstrap - tripleo-ansible-centos-8-molecule-tripleo_cellv2 - # - tripleo-ansible-centos-7-molecule-tripleo_ceph_run_ansible + - tripleo-ansible-centos-8-molecule-tripleo_ceph_run_ansible - tripleo-ansible-centos-8-molecule-tripleo_clients_install - tripleo-ansible-centos-8-molecule-tripleo_config - tripleo-ansible-centos-8-molecule-tripleo_container_image_prepare - - tripleo-ansible-centos-7-molecule-tripleo_container_manage - - tripleo-ansible-centos-7-molecule-tripleo_container_rm - - tripleo-ansible-centos-7-molecule-tripleo_container_stop + - tripleo-ansible-centos-8-molecule-tripleo_container_manage + - tripleo-ansible-centos-8-molecule-tripleo_container_rm + - tripleo-ansible-centos-8-molecule-tripleo_container_stop + - tripleo-ansible-centos-8-molecule-tripleo_container_tag + - tripleo-ansible-centos-8-molecule-tripleo_create_admin + - tripleo-ansible-centos-8-molecule-tripleo_firewall + - tripleo-ansible-centos-8-molecule-tripleo_hieradata + - tripleo-ansible-centos-8-molecule-tripleo_hosts_entries + - tripleo-ansible-centos-8-molecule-tripleo_image_serve + - tripleo-ansible-centos-8-molecule-tripleo_kernel + - tripleo-ansible-centos-8-molecule-tripleo_keystone_resources + - tripleo-ansible-centos-8-molecule-tripleo_module_load + - tripleo-ansible-centos-8-molecule-tripleo_nova_image_cache + - tripleo-ansible-centos-8-molecule-tripleo_ovs_dpdk + - tripleo-ansible-centos-8-molecule-tripleo_packages + - tripleo-ansible-centos-8-molecule-tripleo_persist + - tripleo-ansible-centos-8-molecule-tripleo_podman + - tripleo-ansible-centos-8-molecule-tripleo_ptp + - tripleo-ansible-centos-8-molecule-tripleo_puppet_cache + - tripleo-ansible-centos-8-molecule-tripleo_securetty + - tripleo-ansible-centos-8-molecule-tripleo_ssh_known_hosts + - tripleo-ansible-centos-8-molecule-tripleo_sshd + - tripleo-ansible-centos-8-molecule-tripleo_systemd_wrapper + - tripleo-ansible-centos-8-molecule-tripleo_timezone + - tripleo-ansible-centos-8-molecule-tripleo_transfer + - tripleo-ansible-centos-8-molecule-tripleo_upgrade_hiera + - tripleo-ansible-centos-8-molecule-tripleo_validations_package + - tripleo-ansible-centos-8-molecule-tuned + - tripleo-ansible-centos-8-role-addition + name: tripleo-ansible-molecule-jobs + periodic-weekly: + jobs: + - tripleo-ansible-centos-8-molecule-aide + - tripleo-ansible-centos-8-molecule-backup_and_restore + - tripleo-ansible-centos-8-molecule-login_defs + - tripleo-ansible-centos-8-molecule-test_deps + - tripleo-ansible-centos-8-molecule-test_package_action + - tripleo-ansible-centos-8-molecule-tripleo_bootstrap + - tripleo-ansible-centos-8-molecule-tripleo_cellv2 + - tripleo-ansible-centos-8-molecule-tripleo_ceph_run_ansible + - tripleo-ansible-centos-8-molecule-tripleo_clients_install + - tripleo-ansible-centos-8-molecule-tripleo_config + - tripleo-ansible-centos-8-molecule-tripleo_container_image_prepare + - tripleo-ansible-centos-8-molecule-tripleo_container_manage + - tripleo-ansible-centos-8-molecule-tripleo_container_rm + - tripleo-ansible-centos-8-molecule-tripleo_container_stop - tripleo-ansible-centos-8-molecule-tripleo_container_tag - tripleo-ansible-centos-8-molecule-tripleo_create_admin - tripleo-ansible-centos-8-molecule-tripleo_firewall @@ -88,9 +132,6 @@ - tripleo-ansible-centos-8-molecule-tripleo_validations_package - tripleo-ansible-centos-8-molecule-tuned - tripleo-ansible-centos-8-role-addition - periodic-weekly: - jobs: *jobs - name: tripleo-ansible-molecule-jobs - job: files: - ^tripleo_ansible/roles/aide/.* @@ -128,6 +169,13 @@ parent: tripleo-ansible-centos-8-base vars: tripleo_role_name: test_package_action +- job: + files: + - ^tripleo_ansible/ansible_plugins/.*$ + - ^tox.ini + - ^molecule-requirements.txt + name: tripleo-ansible-centos-8-molecule-tripleo-modules + parent: tripleo-ansible-centos-8-base - job: files: - ^tripleo_ansible/roles/tripleo_bootstrap/.* @@ -143,13 +191,15 @@ vars: tripleo_role_name: tripleo_cellv2 - job: + description: Non-voting due to https://bugs.launchpad.net/tripleo/+bug/1867012 files: - ^tripleo_ansible/roles/tripleo_ceph_run_ansible/.* - name: tripleo-ansible-centos-7-molecule-tripleo_ceph_run_ansible - parent: tripleo-ansible-centos-7-base + name: tripleo-ansible-centos-8-molecule-tripleo_ceph_run_ansible + parent: tripleo-ansible-centos-8-base vars: tripleo_job_ansible_args: -v --skip-tags=run_uuid_ansible,run_ceph_ansible tripleo_role_name: tripleo_ceph_run_ansible + voting: false - job: files: - ^tripleo_ansible/roles/tripleo_clients_install/.* @@ -182,24 +232,24 @@ - ^tripleo_ansible/ansible_plugins/modules/container_puppet_config.py$ - ^tripleo_ansible/ansible_plugins/modules/podman_container.py$ - ^tripleo_ansible/ansible_plugins/modules/podman_container_info.py$ - name: tripleo-ansible-centos-7-molecule-tripleo_container_manage - parent: tripleo-ansible-centos-7-base + name: tripleo-ansible-centos-8-molecule-tripleo_container_manage + parent: tripleo-ansible-centos-8-base vars: tripleo_role_name: tripleo_container_manage voting: false - job: files: - ^tripleo_ansible/roles/tripleo_container_rm/.* - name: tripleo-ansible-centos-7-molecule-tripleo_container_rm - parent: tripleo-ansible-centos-7-base + name: tripleo-ansible-centos-8-molecule-tripleo_container_rm + parent: tripleo-ansible-centos-8-base vars: tripleo_role_name: tripleo_container_rm voting: false - job: files: - ^tripleo_ansible/roles/tripleo_container_stop/.* - name: tripleo-ansible-centos-7-molecule-tripleo_container_stop - parent: tripleo-ansible-centos-7-base + name: tripleo-ansible-centos-8-molecule-tripleo_container_stop + parent: tripleo-ansible-centos-8-base vars: tripleo_role_name: tripleo_container_stop voting: false @@ -266,13 +316,6 @@ parent: tripleo-ansible-centos-8-base vars: tripleo_role_name: tripleo_module_load -- job: - files: - - ^tripleo_ansible/ansible_plugins/.*$ - - ^tox.ini - - ^molecule-requirements.txt - name: tripleo-ansible-centos-8-molecule-tripleo-modules - parent: tripleo-ansible-centos-8-base - job: files: - ^tripleo_ansible/roles/tripleo_nova_image_cache/.* @@ -395,6 +438,7 @@ - ^tox.ini - ^molecule-requirements.txt - ^zuul.d/playbooks/.* + - ^zuul.d/molecule.yaml name: tripleo-ansible-centos-8-role-addition nodeset: centos-8 parent: tox-molecule