From 44c449b7885acb898ef4d18339be6edfcffd18c0 Mon Sep 17 00:00:00 2001 From: Davlet Panech <davlet.panech@windriver.com> Date: Mon, 20 Jan 2025 15:16:44 -0500 Subject: [PATCH] Rename common jobs & yaml files Adopt a new naming convention for the constructs defined in this repo: they are all to be prefixed with "starlingx-common-". Keep old jobs and project templates, but rename the relevant files to "legacy-*.yaml". This is necessary to avoid breakage in downstream projects and branches. Define 2 jobs with the new naming convention, starlingx-common-tox-{linters,pep8}. Story: 2011326 Task: 51561 Change-Id: I4e9339fb9fe952db2c3a9d105282fb7847521f8b Signed-off-by: Davlet Panech <davlet.panech@windriver.com> --- zuul.d/jobs.yaml | 50 ++--------------- zuul.d/legacy-jobs.yaml | 53 +++++++++++++++++++ ...tes.yaml => legacy-project-templates.yaml} | 0 3 files changed, 58 insertions(+), 45 deletions(-) create mode 100644 zuul.d/legacy-jobs.yaml rename zuul.d/{project-templates.yaml => legacy-project-templates.yaml} (100%) diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 1800d02..6733b63 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -1,55 +1,15 @@ +# +# Jobs in this file must begin with "starlingx-common-" +# - job: - name: stx-zuul-jobs-linters - parent: openstack-zuul-jobs-linters - description: | - This job runs against starlingx/zuul-jobs so we can properly - lint our ansible playbooks / roles. - required-projects: - - opendev/base-jobs - - openstack/openstack-zuul-jobs - - openstack/project-config - - opendev/system-config - - zuul/zuul-jobs - nodeset: ubuntu-bionic - vars: - tox_envlist: linters - tox_environment: - #ANSIBLE_ROLES_PATH={env:ANSIBLE_ROLES_PATH:../zuul-jobs/roles:../openstack-zuul-jobs/roles:roles} - ANSIBLE_ROLES_PATH: ~/src/opendev.org/starlingx/zuul-jobs/roles:~/src/opendev.org/opendev/base-jobs/roles:~/src/opendev.org/zuul/zuul-jobs/roles:~/src/opendev.org/openstack/openstack-zuul-jobs/roles:~/src/opendev.org/openstack/project-config/roles:~/src/opendev.org/opendev/system-config/roles - -- job: - name: stx-check-specfile - parent: tox - description: Sanity check RPM spec files - vars: - tox_envlist: rpm-packaging-lint - files: .*\.spec - -- job: - name: stx-tox-bandit-static-scan - parent: tox - description: | - Static code scan of .py files for unknown Severity HIGH issues - vars: - tox_envlist: bandit - files: .*\.py - irrelevant-files: - - ^test-requirements.txt$ - - ^.*\.rst$ - - ^doc/.*$ - - ^releasenotes/.*$ - - ^setup.cfg$ - - ^tox.ini$ - -- job: - name: stx-tox-linters + name: starlingx-common-tox-linters parent: openstack-tox-linters description: | Run Tox linters on debian-bullseye nodeset: debian-bullseye - job: - name: stx-tox-pep8 + name: starlingx-common-tox-pep8 parent: openstack-tox-pep8 description: | Run Tox pep8 tests on debian-bullseye diff --git a/zuul.d/legacy-jobs.yaml b/zuul.d/legacy-jobs.yaml new file mode 100644 index 0000000..5bad2c5 --- /dev/null +++ b/zuul.d/legacy-jobs.yaml @@ -0,0 +1,53 @@ +# +# These jobs are deprecated, please use the ones in jobs.yaml +# +- job: + name: stx-zuul-jobs-linters + parent: openstack-zuul-jobs-linters + description: | + This job runs against starlingx/zuul-jobs so we can properly + lint our ansible playbooks / roles. + required-projects: + - opendev/base-jobs + - openstack/openstack-zuul-jobs + - openstack/project-config + - opendev/system-config + - zuul/zuul-jobs + nodeset: ubuntu-bionic + vars: + tox_envlist: linters + tox_environment: + #ANSIBLE_ROLES_PATH={env:ANSIBLE_ROLES_PATH:../zuul-jobs/roles:../openstack-zuul-jobs/roles:roles} + ANSIBLE_ROLES_PATH: ~/src/opendev.org/starlingx/zuul-jobs/roles:~/src/opendev.org/opendev/base-jobs/roles:~/src/opendev.org/zuul/zuul-jobs/roles:~/src/opendev.org/openstack/openstack-zuul-jobs/roles:~/src/opendev.org/openstack/project-config/roles:~/src/opendev.org/opendev/system-config/roles + +- job: + name: stx-check-specfile + parent: tox + description: Sanity check RPM spec files + vars: + tox_envlist: rpm-packaging-lint + files: .*\.spec + +- job: + name: stx-tox-bandit-static-scan + parent: tox + description: | + Static code scan of .py files for unknown Severity HIGH issues + vars: + tox_envlist: bandit + files: .*\.py + irrelevant-files: + - ^test-requirements.txt$ + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^setup.cfg$ + - ^tox.ini$ + +- job: + name: stx-tox-linters + parent: starlingx-common-tox-linters + +- job: + name: stx-tox-pep8 + parent: starlingx-common-tox-linters diff --git a/zuul.d/project-templates.yaml b/zuul.d/legacy-project-templates.yaml similarity index 100% rename from zuul.d/project-templates.yaml rename to zuul.d/legacy-project-templates.yaml