---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- job:
    name: keystone-dsvm-functional
    parent: legacy-dsvm-base
    run: playbooks/legacy/keystone-dsvm-functional/run.yaml
    post-run: playbooks/legacy/keystone-dsvm-functional/post.yaml
    timeout: 4200
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/keystone
      - openstack/keystone-tempest-plugin
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^keystone/tests/unit/.*$
      - ^releasenotes/.*$

- job:
    name: keystone-dsvm-functional-v3-only
    parent: legacy-dsvm-base
    run: playbooks/legacy/keystone-dsvm-functional-v3-only/run.yaml
    post-run: playbooks/legacy/keystone-dsvm-functional-v3-only/post.yaml
    timeout: 4200
    voting: false
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/keystone
      - openstack/keystone-tempest-plugin
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^keystone/tests/unit/.*$
      - ^releasenotes/.*$

- job:
    name: keystone-dsvm-py35-functional-v3-only
    parent: legacy-dsvm-base
    run: playbooks/legacy/keystone-dsvm-py35-functional-v3-only/run.yaml
    post-run: playbooks/legacy/keystone-dsvm-py35-functional-v3-only/post.yaml
    timeout: 4200
    voting: false
    required-projects:
      - openstack-infra/devstack-gate
      - openstack/keystone
      - openstack/keystone-tempest-plugin
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^keystone/tests/unit/.*$
      - ^releasenotes/.*$

# This job will execute 'tox -e upgrade' from the OSA
# repo specified in 'osa_test_repo'.
- job:
    name: openstack-ansible-keystone-rolling-upgrade
    parent: openstack-ansible-cross-repo-functional
    voting: false
    required-projects:
      - name: openstack/openstack-ansible-os_keystone
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^keystone/tests/unit/.*$
      - ^releasenotes/.*$
    vars:
      tox_env: upgrade
      osa_test_repo: "openstack/openstack-ansible-os_keystone"

# Experimental
- job:
    name: keystone-tox-patch_cover
    parent: legacy-base
    run: playbooks/legacy/keystone-tox-patch_cover/run.yaml
    post-run: playbooks/legacy/keystone-tox-patch_cover/post.yaml
    timeout: 2400
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^keystone/tests/unit/.*$
      - ^releasenotes/.*$
    required-projects:
      - openstack/requirements

# Experimental
- job:
    name: keystone-dsvm-grenade-multinode
    parent: legacy-dsvm-base-multinode
    run: playbooks/legacy/keystone-dsvm-grenade-multinode/run.yaml
    post-run: playbooks/legacy/keystone-dsvm-grenade-multinode/post.yaml
    timeout: 10800
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^keystone/tests/unit/.*$
      - ^releasenotes/.*$
    required-projects:
      - openstack-dev/grenade
      - openstack-infra/devstack-gate
      - openstack/keystone
    nodeset: legacy-ubuntu-xenial-2-node

- project:
    name: openstack/keystone
    check:
      jobs:
        - keystone-dsvm-functional
        - keystone-dsvm-functional-v3-only
        - keystone-dsvm-py35-functional-v3-only
        - openstack-ansible-keystone-rolling-upgrade
    gate:
      jobs:
        - keystone-dsvm-functional
    experimental:
      jobs:
        - keystone-tox-patch_cover
        - keystone-dsvm-grenade-multinode