- project:
    templates:
      - openstack-lower-constraints-jobs
      - openstack-python3-wallaby-jobs
      - periodic-stable-jobs
      - publish-openstack-docs-pti
      - check-requirements
      - release-notes-jobs-python3
    check:
      jobs:
        - openstack-tox-pylint:
            voting: false
        - sahara-tests-scenario
        - sahara-tests-scenario-v2
        - sahara-tests-tempest
        - sahara-tests-tempest-v2
        - openstack-tox-cover:
            voting: false
        - sahara-grenade:
            voting: false
        - sahara-openstack-ansible-functional:
            voting: false
    gate:
      queue: sahara
      jobs:
        - sahara-tests-scenario
        - sahara-tests-scenario-v2
        - sahara-tests-tempest
        - sahara-tests-tempest-v2
        # - sahara-grenade
        - sahara-openstack-ansible-functional:
            voting: false
    experimental:
      jobs:
        - sahara-buildimages-ambari
        - sahara-buildimages-cloudera
        - sahara-buildimages-mapr
        - sahara-buildimages-spark
        - sahara-tests-scenario-multinode-spark

- job:
    name: sahara-grenade
    parent: grenade
    required-projects:
      - opendev.org/openstack/grenade
      - opendev.org/openstack/sahara
      - opendev.org/openstack/python-saharaclient
      - opendev.org/openstack/heat
      - opendev.org/openstack/heat-tempest-plugin
      - opendev.org/openstack/python-heatclient
      - opendev.org/openstack/sahara-tests
      - opendev.org/openstack/sahara-plugin-ambari
      - opendev.org/openstack/sahara-plugin-cdh
      - opendev.org/openstack/sahara-plugin-mapr
      - opendev.org/openstack/sahara-plugin-spark
      - opendev.org/openstack/sahara-plugin-storm
      - opendev.org/openstack/sahara-plugin-vanilla
    vars:
      grenade_localrc:
        RUN_HEAT_INTEGRATION_TESTS: False
      grenade_devstack_localrc:
        shared:
          IMAGE_URLS: http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2,https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-disk1.img
      devstack_local_conf:
        test-config:
          $TEMPEST_CONFIG:
            data_processing:
              test_image_name: xenial-server-cloudimg-amd64-disk1
              test_ssh_user: ubuntu
            data-processing-feature-enabled:
              s3: True
      devstack_plugins:
        sahara: https://opendev.org/openstack/sahara
        heat: https://opendev.org/openstack/heat
      devstack_services:
        h-api: true
        h-api-cfn: true
        h-eng: true
        heat: true
        tls-proxy: false
      tempest_plugins:
        - sahara-tests
        - heat-tempest-plugin
      tempest_test_regex: ^(sahara_tempest_plugin.tests.)
      tox_envlist: all
    group-vars:
      subnode:
        devstack_services:
          tls-proxy: false
    irrelevant-files:
      - ^(test-|)requirements.txt$
      - ^.*\.rst$
      - ^doc/.*$
      - ^sahara/locale/.*$
      - ^sahara/tests/unit/.*$
      - ^releasenotes/.*$
      - ^tools/.*$
      - ^tox.ini$

- job:
    name: sahara-openstack-ansible-functional
    description: |
      OSA job focused on openstack-ansible-os_sahara
    parent: openstack-ansible-cross-repo-functional
    required-projects:
      - openstack/openstack-ansible-os_sahara
    vars:
      osa_test_repo: openstack/openstack-ansible-os_sahara
      devstack_localrc:
        USE_PYTHON3: True

- job:
    name: sahara-buildimages-base
    nodeset: centos-8
    vars:
      sahara_src_dir: src/opendev.org/openstack/sahara
    run: playbooks/buildimages/run.yaml
    timeout: 7200
    required-projects:
      - openstack/sahara
      - openstack/sahara-plugin-ambari
      - openstack/sahara-plugin-cdh
      - openstack/sahara-plugin-mapr
      - openstack/sahara-plugin-spark
      - openstack/sahara-plugin-storm
      - openstack/sahara-plugin-vanilla

- job:
    name: sahara-buildimages-ambari
    parent: sahara-buildimages-base
    vars:
      sahara_plugin: ambari

- job:
    name: sahara-buildimages-cloudera
    parent: sahara-buildimages-base
    vars:
      sahara_plugin: cdh

- job:
    name: sahara-buildimages-mapr
    parent: sahara-buildimages-base
    vars:
      sahara_plugin: mapr

- job:
    name: sahara-buildimages-spark
    parent: sahara-buildimages-base
    vars:
      sahara_plugin: spark
