<commit_before>- 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
    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

- 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_localrc:
        TEMPEST_PLUGINS: "{{ ansible_user_dir }}/src/opendev.org/openstack/tempest-horizon"
        USE_PYTHON3: true
      devstack_services:
        horizon: true
        tempest: true
      tempest_concurrency: 2
      tempest_test_regex: 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: nodejs10-npm-run-lint
    parent: nodejs-npm-run-lint
    description: |
      Run lint using Node 10 for horizon plugins.
    vars:
      node_version: 10
    nodeset: ubuntu-bionic
    required-projects:
      openstack/horizon

- job:
    name: nodejs10-npm-run-test
    parent: nodejs-npm-run-test
    description: |
      Run test using Node 10 for horizon plugins.
    vars:
      node_version: 10
    nodeset: ubuntu-bionic
    required-projects:
      openstack/horizon

- project-template:
    name: horizon-nodejs10-jobs
    description: |<commit_msg>Set tox_constraints_file for npm jobs and integration tests<commit_after>- 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_localrc:
        TEMPEST_PLUGINS: "{{ ansible_user_dir }}/src/opendev.org/openstack/tempest-horizon"
        USE_PYTHON3: true
      devstack_services:
        horizon: true
        tempest: true
      tempest_concurrency: 2
      tempest_test_regex: 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: nodejs10-npm-run-lint
    parent: nodejs-npm-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
    required-projects:
      - openstack/horizon
      - openstack/requirements

- job:
    name: nodejs10-npm-run-test
    parent: nodejs-npm-run-test
    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"
    nodeset: ubuntu-bionic
    required-projects:
      - openstack/horizon
      - openstack/requirements

- project-template:
    name: horizon-nodejs10-jobs
    description: |
{'fraction_non_alphanumeric': 0.1287770574662125, 'fraction_numerical': 0.008350730688935281, 'mean_word_length': 2.3231106243154436, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4248299', 'n_tokens_mistral': 3183, 'n_tokens_neox': 3043, 'n_words': 574}