- project:
    templates:
      - publish-openstack-docs-pti
      - openstack-cover-jobs
      - openstack-python3-jobs
      - check-requirements
      - release-notes-jobs-python3
      - periodic-stable-jobs
      - manila-tempest-plugin-jobs-using-service-image
    queue: manila
    check:
      jobs:
        - manila-tox-genconfig
        - openstack-tox-pylint:
            voting: false
            timeout: 5400
        - openstack-tox-cover:
            voting: false
        - manila-tox-py311-with-sqlalchemy-20:
            voting: false
        - manila-tempest-plugin-dummy-no-dhss
        - manila-tempest-plugin-dummy-dhss-legacy
        - manila-tempest-plugin-container:
            voting: false
        - manila-tempest-plugin-lvm-fips:
            voting: false
        - manila-grenade
        - manila-grenade-skip-level-always
        - manila-rally-no-ss:
            voting: false
        - manila-rally-ss:
            voting: false
    gate:
      jobs:
        - manila-tempest-plugin-dummy-no-dhss
        - manila-tempest-plugin-dummy-dhss-legacy

# Non-voting job while SQLAlchemy 2.0 is still blocked by upper-constraints
- job:
    name: manila-tox-py311-with-sqlalchemy-20
    parent: openstack-tox-py311
    description: |
      Run unit tests with SQLAlchemy 2.x, alembic and oslo.db.
      Takes advantage of the base tox job's install-siblings feature.
    branches: stable/2024.1
    required-projects:
      - name: github.com/sqlalchemy/sqlalchemy
        override-checkout: rel_2_0_29
      - name: github.com/sqlalchemy/alembic
        override-checkout: rel_1_13_1
      - name: openstack/oslo.db
        override-checkout: 15.0.0

- job:
    name: manila-tox-genconfig
    parent: openstack-tox
    description: |
      Run tests for manila project.

      Uses tox with the ``genconfig`` environment.
    post-run: playbooks/manila-tox-genconfig/post.yaml
    vars:
      tox_envlist: genconfig

- job:
    name: manila-rally-no-ss
    parent: rally-task-manila-no-ss
    irrelevant-files: &irrelevant-files
      - ^(test-|)requirements.txt$
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^manila/tests/.*$
      - ^releasenotes/.*$
      - ^setup.cfg$
      - ^tools/.*$
      - ^tox.ini$
    vars:
      rally_task: rally-jobs/rally-manila-no-ss.yaml
      devstack_plugins:
        rally-openstack: https://opendev.org/openstack/rally-openstack
      devstack_localrc:
        GLOBAL_VENV: false
    required-projects:
      - openstack/rally-openstack

- job:
    name: manila-rally-ss
    parent: rally-task-manila-ss
    irrelevant-files: *irrelevant-files
    vars:
      rally_task: rally-jobs/rally-manila.yaml
      devstack_plugins:
        rally-openstack: https://opendev.org/openstack/rally-openstack
      devstack_localrc:
        GLOBAL_VENV: false
    required-projects:
      - openstack/rally-openstack

- job:
    name: manila-tempest-plugin-dummy-dhss-legacy
    parent: manila-tempest-plugin-dummy-dhss
    vars:
      devstack_local_conf:
        test-config:
          "$TEMPEST_CONFIG":
            share:
              run_negative_migration_replica_tests: true
              run_positive_migration_replica_tests: false
