- job:
    name: zun-tempest-base
    parent: devstack-tempest
    description: Zun Devstack tempest base job
    timeout: 4200
    required-projects:
      - openstack-dev/devstack
      - openstack/devstack-plugin-container
      - openstack/kuryr-libnetwork
      - openstack/zun
      - openstack/zun-tempest-plugin
      - openstack/python-zunclient
    irrelevant-files:
      - ^.*\.rst$
      - ^doc/.*$
    vars:
      tox_envlist: all-plugin
      tempest_test_regex: zun_tempest_plugin.tests.tempest.api
      devstack_localrc:
        ZUN_USE_UWSGI: true
        KURYR_CONFIG_DIR: /etc/kuryr-libnetwork
        ZUN_DRIVER: docker
        ZUN_DB_TYPE: sql
      devstack_local_conf:
        test-config:
          $TEMPEST_CONFIG:
            container_service:
              min_microversion: 1.32
      devstack_services:
        tempest: true
      devstack_plugins:
        zun: https://git.openstack.org/openstack/zun
        kuryr-libnetwork: https://git.openstack.org/openstack/kuryr-libnetwork
        devstack-plugin-container: https://git.openstack.org/openstack/devstack-plugin-container
        zun-tempest-plugin: https://git.openstack.org/openstack/zun-tempest-plugin
    post-run: playbooks/zun-tempest-base/post.yaml

- job:
    name: zun-tempest-base-multinode
    parent: zun-tempest-base
    description: Zun Devstack tempest multinode base job
    nodeset: openstack-two-node-bionic
    timeout: 7800
    vars:
      devstack_localrc:
        KURYR_PROCESS_EXTERNAL_CONNECTIVITY: false
        KURYR_CAPABILITY_SCOPE: global
        USE_PYTHON3: true
    group-vars:
      subnode:
        devstack_localrc:
          KURYR_CAPABILITY_SCOPE: global
          KURYR_PROCESS_EXTERNAL_CONNECTIVITY: false
          KURYR_CONFIG_DIR: /etc/kuryr-libnetwork
          USE_PYTHON3: true

- job:
    name: zun-tempest-docker-sql
    parent: zun-tempest-base

- job:
    name: zun-tempest-py35-docker-sql
    parent: zun-tempest-base
    vars:
      devstack_localrc:
        USE_PYTHON3: true
      devstack_services:
        s-account: false
        s-object: false
        s-container: false
        s-proxy: false

- job:
    name: zun-tempest-multinode-docker-sql
    parent: zun-tempest-base-multinode

- job:
    name: zun-tempest-docker-etcd
    parent: zun-tempest-base
    voting: false
    vars:
      devstack_localrc:
        ZUN_DB_TYPE: etcd
        USE_PYTHON3: true

- project:
    templates:
      - check-requirements
      - openstack-cover-jobs
      - openstack-lower-constraints-jobs
      - openstack-python-jobs
      - openstack-python35-jobs
      - openstack-python36-jobs
      - openstack-python37-jobs
      - publish-openstack-docs-pti
      - release-notes-jobs-python3
    check:
      jobs:
        - zun-tempest-docker-sql
        - zun-tempest-py35-docker-sql
        - zun-tempest-docker-etcd
        - zun-tempest-multinode-docker-sql
    gate:
      queue: zun
      jobs:
        - zun-tempest-docker-sql
        - zun-tempest-py35-docker-sql
        - zun-tempest-multinode-docker-sql
