From ef1270167b1a35c19cee1009a3d07485d2681e8e Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Wed, 24 Jun 2020 17:33:06 +0900 Subject: [PATCH] zuul: break down config files into pieces Our .zuul.yaml is long enough now. Let's split it into meaningful pieces for better readability. Change-Id: I53daefd95946d19d8f4f5845f0e83bf652c3a9aa --- .zuul.d/base.yaml | 30 ++++ .zuul.d/django-jobs.yaml | 46 +++++ .zuul.d/nodejs-jobs.yaml | 51 ++++++ .zuul.d/project.yaml | 29 +++ .zuul.d/tempest-and-integrated.yaml | 69 +++++++ .zuul.d/xstatic-master.yaml | 37 ++++ .zuul.yaml | 267 ---------------------------- 7 files changed, 262 insertions(+), 267 deletions(-) create mode 100644 .zuul.d/base.yaml create mode 100644 .zuul.d/django-jobs.yaml create mode 100644 .zuul.d/nodejs-jobs.yaml create mode 100644 .zuul.d/project.yaml create mode 100644 .zuul.d/tempest-and-integrated.yaml create mode 100644 .zuul.d/xstatic-master.yaml delete mode 100644 .zuul.yaml diff --git a/.zuul.d/base.yaml b/.zuul.d/base.yaml new file mode 100644 index 0000000000..f6aa713601 --- /dev/null +++ b/.zuul.d/base.yaml @@ -0,0 +1,30 @@ +- job: + name: horizon-openstack-tox-base + parent: openstack-tox + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^.*/locale/.*$ + +- job: + name: horizon-selenium-headless + parent: horizon-openstack-tox-base + pre-run: playbooks/horizon-selenium-headless/pre.yaml + vars: + tox_envlist: selenium-headless + +- job: + # Security testing for known issues + name: horizon-tox-bandit-baseline + parent: openstack-tox + timeout: 2400 + vars: + tox_envlist: bandit-baseline + irrelevant-files: + - ^.*\.rst$ + - ^.*/locale/.*$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^setup.cfg$ + - ^tools/.*$ diff --git a/.zuul.d/django-jobs.yaml b/.zuul.d/django-jobs.yaml new file mode 100644 index 0000000000..46391ba74f --- /dev/null +++ b/.zuul.d/django-jobs.yaml @@ -0,0 +1,46 @@ +- job: + name: horizon-tox-python3-django + abstract: true + parent: horizon-openstack-tox-base + description: | + Run tox with different Django version. + + .. zuul:jobvar: tox_envlist + + Which tox environment to run + + .. zuul:jobvar: django_version + + Django version to be used. + pip version specifier like ``>=1.11,<2.0`` should be passed. + + pre-run: playbooks/horizon-tox-django/pre.yaml + run: playbooks/horizon-tox-django/run.yaml + vars: + tox_envlist: py36 + required-projects: + - name: openstack/horizon + +- job: + name: horizon-tox-python3-django22 + parent: horizon-tox-python3-django + vars: + django_version: '>=2.2,<3.0' + +- project-template: + name: horizon-non-primary-django-jobs + description: | + Run unit tests with non-primary Django versions. + check: + jobs: + # Currently we only support Django 2.2, so there is no need + # to run tests with different versions of Django. + # We specify a job in openstack-python3-victoria-jobs(-horizon) + # to keep this project template as it is used in horizon plugins. + - openstack-tox-py38 + # NOTE: We keep it as a template even though it is not used now. + # - horizon-tox-python3-django22 + gate: + jobs: + - openstack-tox-py38 + # - horizon-tox-python3-django22 diff --git a/.zuul.d/nodejs-jobs.yaml b/.zuul.d/nodejs-jobs.yaml new file mode 100644 index 0000000000..8c4abebb0e --- /dev/null +++ b/.zuul.d/nodejs-jobs.yaml @@ -0,0 +1,51 @@ +- job: + name: horizon-nodejs10-run-lint + parent: nodejs-run-lint + description: | + Run lint using Node 10 for horizon plugins. + vars: + node_version: 10 + tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" + nodeset: ubuntu-bionic + pre-run: playbooks/horizon-nodejs/pre.yaml + required-projects: + - openstack/horizon + - openstack/requirements + +- job: + name: horizon-nodejs10-run-test + parent: nodejs-run-test-browser + description: | + Run test using Node 10 for horizon plugins. + vars: + node_version: 10 + tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" + pre-run: playbooks/horizon-nodejs/pre.yaml + nodeset: ubuntu-bionic + required-projects: + - openstack/horizon + - openstack/requirements + +- project-template: + name: horizon-nodejs10-jobs + description: | + Run lint and test jobs using Node 10 (LTS) for horizon plugins. + check: + jobs: + - horizon-nodejs10-run-lint + - horizon-nodejs10-run-test + gate: + jobs: + - horizon-nodejs10-run-lint + - horizon-nodejs10-run-test + +- project-template: + name: horizon-nodejs10-jobs-nonvoting + description: | + Run lint and test jobs using Node 10 (LTS) for horizon plugins. + check: + jobs: + - horizon-nodejs10-run-lint: + voting: false + - horizon-nodejs10-run-test: + voting: false diff --git a/.zuul.d/project.yaml b/.zuul.d/project.yaml new file mode 100644 index 0000000000..8b8572edde --- /dev/null +++ b/.zuul.d/project.yaml @@ -0,0 +1,29 @@ +- project: + templates: + - check-requirements + - horizon-nodejs10-jobs + - horizon-non-primary-django-jobs + - openstack-lower-constraints-jobs + - openstack-python3-victoria-jobs + - periodic-stable-jobs + - publish-openstack-docs-pti + - release-notes-jobs-python3 + check: + jobs: + - horizon-selenium-headless + - horizon-integration-tests + - horizon-dsvm-tempest-plugin + - horizon-tox-bandit-baseline + - horizon-tempest-plugin-ipv6 + gate: + queue: horizon + jobs: + - horizon-dsvm-tempest-plugin + - horizon-selenium-headless + - horizon-integration-tests + - horizon-tempest-plugin-ipv6 + experimental: + jobs: + - horizon-integration-tests-xstatic-master + - horizon-tox-py36-xstatic-master + - horizon-nodejs10-run-test-xstatic-master diff --git a/.zuul.d/tempest-and-integrated.yaml b/.zuul.d/tempest-and-integrated.yaml new file mode 100644 index 0000000000..5457094ee6 --- /dev/null +++ b/.zuul.d/tempest-and-integrated.yaml @@ -0,0 +1,69 @@ +- job: + name: horizon-integration-tests + parent: devstack + pre-run: playbooks/horizon-devstack-integration/pre.yaml + run: playbooks/horizon-devstack-integration/run.yaml + post-run: playbooks/horizon-devstack-integration/post.yaml + roles: + - zuul: openstack-infra/devstack + required-projects: + - openstack/horizon + - openstack/requirements + irrelevant-files: + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^.*/locale/.*$ + # Unit tests are not related to the integration tests + - ^horizon/test/unit/.*$ + - ^openstack_auth/tests/unit/.*$ + - ^openstack_dashboard/test/unit/.*$ + - ^openstack_dashboard/contrib/.*/tests.py$ + - ^openstack_dashboard/dashboards/.*/tests.py$ + # JavaScript unit tests are not related to the integration tests + - ^openstack_dashboard/.*/[^/]*\.spec\.js$ + - ^horizon/static/.*/[^/]*\.spec\.js$ + vars: + devstack_services: + horizon: true + tox_envlist: integration + tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" + +- job: + name: horizon-dsvm-tempest-plugin + parent: devstack-tempest + required-projects: &base_required_projects + - name: openstack/horizon + - name: openstack/tempest + - name: openstack/tempest-horizon + irrelevant-files: &base_irrelevant_files + - ^.*\.rst$ + - ^doc/.*$ + - ^releasenotes/.*$ + - ^.*/locale/.*$ + # Test codes are not related to tempest tests + # as tempest is defined in a separete repository + - ^horizon/test/.*$ + - ^openstack_auth/tests/.*$ + - ^openstack_dashboard/test/.*$ + - ^openstack_dashboard/contrib/.*/tests.py$ + - ^openstack_dashboard/dashboards/.*/tests.py$ + # JavaScript unit tests are not related to tempest tests + - ^openstack_dashboard/.*/[^/]*\.spec\.js$ + - ^horizon/static/.*/[^/]*\.spec\.js$ + vars: &base_vars + devstack_services: + horizon: true + tempest: true + tempest_concurrency: 2 + tempest_test_regex: horizon + tempest_plugins: + - tempest-horizon + tox_envlist: all + +- job: + name: horizon-tempest-plugin-ipv6 + parent: devstack-tempest-ipv6 + required-projects: *base_required_projects + irrelevant-files: *base_irrelevant_files + vars: *base_vars diff --git a/.zuul.d/xstatic-master.yaml b/.zuul.d/xstatic-master.yaml new file mode 100644 index 0000000000..47c366ea65 --- /dev/null +++ b/.zuul.d/xstatic-master.yaml @@ -0,0 +1,37 @@ +- job: + name: horizon-integration-tests-xstatic-master + parent: horizon-integration-tests + required-projects: &xstatic-projects + - openstack/horizon + - openstack/xstatic-angular + - openstack/xstatic-angular-bootstrap + - openstack/xstatic-angular-gettext + - openstack/xstatic-angular-lrdragndrop + - openstack/xstatic-angular-smart-table + - openstack/xstatic-bootstrap-datepicker + - openstack/xstatic-bootstrap-scss + - openstack/xstatic-bootswatch + - openstack/xstatic-d3 + - openstack/xstatic-font-awesome + - openstack/xstatic-hogan + - openstack/xstatic-jasmine + - openstack/xstatic-jquery-migrate + - openstack/xstatic-jquery.quicksearch + - openstack/xstatic-jquery.tablesorter + - openstack/xstatic-jsencrypt + - openstack/xstatic-mdi + - openstack/xstatic-rickshaw + - openstack/xstatic-roboto-fontface + - openstack/xstatic-spin + - x/xstatic-angular-fileupload + +- job: + name: horizon-tox-py36-xstatic-master + parent: openstack-tox-py36 + required-projects: *xstatic-projects + +- job: + name: horizon-nodejs10-run-test-xstatic-master + parent: horizon-nodejs10-run-test + required-projects: *xstatic-projects + pre-run: playbooks/npm-test-xstatic-master/pre.yaml diff --git a/.zuul.yaml b/.zuul.yaml deleted file mode 100644 index df5b6da0b7..0000000000 --- a/.zuul.yaml +++ /dev/null @@ -1,267 +0,0 @@ -- job: - name: horizon-openstack-tox-base - parent: openstack-tox - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - - ^releasenotes/.*$ - - ^.*/locale/.*$ - -- job: - name: horizon-tox-python3-django - abstract: true - parent: horizon-openstack-tox-base - description: | - Run tox with different Django version. - - .. zuul:jobvar: tox_envlist - - Which tox environment to run - - .. zuul:jobvar: django_version - - Django version to be used. - pip version specifier like ``>=1.11,<2.0`` should be passed. - - pre-run: playbooks/horizon-tox-django/pre.yaml - run: playbooks/horizon-tox-django/run.yaml - vars: - tox_envlist: py36 - required-projects: - - name: openstack/horizon - -- job: - name: horizon-tox-python3-django22 - parent: horizon-tox-python3-django - vars: - django_version: '>=2.2,<3.0' - -- job: - name: horizon-selenium-headless - parent: horizon-openstack-tox-base - pre-run: playbooks/horizon-selenium-headless/pre.yaml - vars: - tox_envlist: selenium-headless - -- job: - name: horizon-integration-tests - parent: devstack - pre-run: playbooks/horizon-devstack-integration/pre.yaml - run: playbooks/horizon-devstack-integration/run.yaml - post-run: playbooks/horizon-devstack-integration/post.yaml - roles: - - zuul: openstack-infra/devstack - required-projects: - - openstack/horizon - - openstack/requirements - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - - ^releasenotes/.*$ - - ^.*/locale/.*$ - # Unit tests are not related to the integration tests - - ^horizon/test/unit/.*$ - - ^openstack_auth/tests/unit/.*$ - - ^openstack_dashboard/test/unit/.*$ - - ^openstack_dashboard/contrib/.*/tests.py$ - - ^openstack_dashboard/dashboards/.*/tests.py$ - # JavaScript unit tests are not related to the integration tests - - ^openstack_dashboard/.*/[^/]*\.spec\.js$ - - ^horizon/static/.*/[^/]*\.spec\.js$ - vars: - devstack_services: - horizon: true - tox_envlist: integration - tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" - -- job: - name: horizon-dsvm-tempest-plugin - parent: devstack-tempest - required-projects: &base_required_projects - - name: openstack/horizon - - name: openstack/tempest - - name: openstack/tempest-horizon - irrelevant-files: &base_irrelevant_files - - ^.*\.rst$ - - ^doc/.*$ - - ^releasenotes/.*$ - - ^.*/locale/.*$ - # Test codes are not related to tempest tests - # as tempest is defined in a separete repository - - ^horizon/test/.*$ - - ^openstack_auth/tests/.*$ - - ^openstack_dashboard/test/.*$ - - ^openstack_dashboard/contrib/.*/tests.py$ - - ^openstack_dashboard/dashboards/.*/tests.py$ - # JavaScript unit tests are not related to tempest tests - - ^openstack_dashboard/.*/[^/]*\.spec\.js$ - - ^horizon/static/.*/[^/]*\.spec\.js$ - vars: &base_vars - devstack_services: - horizon: true - tempest: true - tempest_concurrency: 2 - tempest_test_regex: horizon - tempest_plugins: - - tempest-horizon - tox_envlist: all - -- job: - name: horizon-tempest-plugin-ipv6 - parent: devstack-tempest-ipv6 - required-projects: *base_required_projects - irrelevant-files: *base_irrelevant_files - vars: *base_vars - -- job: - # Security testing for known issues - name: horizon-tox-bandit-baseline - parent: openstack-tox - timeout: 2400 - vars: - tox_envlist: bandit-baseline - irrelevant-files: - - ^.*\.rst$ - - ^.*/locale/.*$ - - ^doc/.*$ - - ^releasenotes/.*$ - - ^setup.cfg$ - - ^tools/.*$ - -- job: - name: horizon-nodejs10-run-lint - parent: nodejs-run-lint - description: | - Run lint using Node 10 for horizon plugins. - vars: - node_version: 10 - tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" - nodeset: ubuntu-bionic - pre-run: playbooks/horizon-nodejs/pre.yaml - required-projects: - - openstack/horizon - - openstack/requirements - -- job: - name: horizon-nodejs10-run-test - parent: nodejs-run-test-browser - description: | - Run test using Node 10 for horizon plugins. - vars: - node_version: 10 - tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" - pre-run: playbooks/horizon-nodejs/pre.yaml - nodeset: ubuntu-bionic - required-projects: - - openstack/horizon - - openstack/requirements - -- project-template: - name: horizon-nodejs10-jobs - description: | - Run lint and test jobs using Node 10 (LTS) for horizon plugins. - check: - jobs: - - horizon-nodejs10-run-lint - - horizon-nodejs10-run-test - gate: - jobs: - - horizon-nodejs10-run-lint - - horizon-nodejs10-run-test - -- job: - name: horizon-integration-tests-xstatic-master - parent: horizon-integration-tests - required-projects: &xstatic-projects - - openstack/horizon - - openstack/xstatic-angular - - openstack/xstatic-angular-bootstrap - - openstack/xstatic-angular-gettext - - openstack/xstatic-angular-lrdragndrop - - openstack/xstatic-angular-smart-table - - openstack/xstatic-bootstrap-datepicker - - openstack/xstatic-bootstrap-scss - - openstack/xstatic-bootswatch - - openstack/xstatic-d3 - - openstack/xstatic-font-awesome - - openstack/xstatic-hogan - - openstack/xstatic-jasmine - - openstack/xstatic-jquery-migrate - - openstack/xstatic-jquery.quicksearch - - openstack/xstatic-jquery.tablesorter - - openstack/xstatic-jsencrypt - - openstack/xstatic-mdi - - openstack/xstatic-rickshaw - - openstack/xstatic-roboto-fontface - - openstack/xstatic-spin - - x/xstatic-angular-fileupload - -- job: - name: horizon-tox-py36-xstatic-master - parent: openstack-tox-py36 - required-projects: *xstatic-projects - -- job: - name: horizon-nodejs10-run-test-xstatic-master - parent: horizon-nodejs10-run-test - required-projects: *xstatic-projects - pre-run: playbooks/npm-test-xstatic-master/pre.yaml - -- project-template: - name: horizon-nodejs10-jobs-nonvoting - description: | - Run lint and test jobs using Node 10 (LTS) for horizon plugins. - check: - jobs: - - horizon-nodejs10-run-lint: - voting: false - - horizon-nodejs10-run-test: - voting: false - -- project-template: - name: horizon-non-primary-django-jobs - description: | - Run unit tests with non-primary Django versions. - check: - jobs: - # Currently we only support Django 2.2, so there is no need - # to run tests with different versions of Django. - # We specify a job in openstack-python3-victoria-jobs(-horizon) - # to keep this project template as it is used in horizon plugins. - - openstack-tox-py38 - # NOTE: We keep it as a template even though it is not used now. - # - horizon-tox-python3-django22 - gate: - jobs: - - openstack-tox-py38 - # - horizon-tox-python3-django22 - -- project: - templates: - - check-requirements - - horizon-nodejs10-jobs - - horizon-non-primary-django-jobs - - openstack-lower-constraints-jobs - - openstack-python3-victoria-jobs - - periodic-stable-jobs - - publish-openstack-docs-pti - - release-notes-jobs-python3 - check: - jobs: - - horizon-selenium-headless - - horizon-integration-tests - - horizon-dsvm-tempest-plugin - - horizon-tox-bandit-baseline - - horizon-tempest-plugin-ipv6 - gate: - queue: horizon - jobs: - - horizon-dsvm-tempest-plugin - - horizon-selenium-headless - - horizon-integration-tests - - horizon-tempest-plugin-ipv6 - experimental: - jobs: - - horizon-integration-tests-xstatic-master - - horizon-tox-py36-xstatic-master - - horizon-nodejs10-run-test-xstatic-master