- job:
    name: trove-tox-bandit-baseline
    parent: openstack-tox
    timeout: 2400
    vars:
      tox_envlist: bandit-baseline
    required-projects:
      - openstack/requirements
    irrelevant-files:
      - ^.*\.rst$
      - ^.*\.txt$
      - ^api-ref/.*$
      - ^contrib/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^releasenotes/.*$
      - ^setup.cfg$
      - ^tools/.*$
      - ^trove/hacking/.*$
      - ^trove/tests/scenario/.*$
      - ^trove/tests/unittests/.*$

- job:
    name: trove-tempest
    parent: devstack-tempest
    nodeset: trove-ubuntu-noble
    timeout: 10800
    required-projects: &base_required_projects
      - openstack/trove
      - openstack/trove-tempest-plugin
      - openstack/tempest
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^releasenotes/.*$
      - ^test-requirements.txt$
      - ^tox.ini$
      - ^LICENSE$
      - ^contrib/
      - ^zuul\.d/
      - ^\..+
    vars: &base_vars
      tox_envlist: all
      tempest_concurrency: 1
      devstack_localrc:
        TEMPEST_PLUGINS: /opt/stack/trove-tempest-plugin
        SYNC_LOG_TO_CONTROLLER: True
        TROVE_DATASTORE_VERSION: 8.0
        TROVE_AGENT_CALL_HIGH_TIMEOUT: 1800
        SWIFT_LOOPBACK_DISK_SIZE: 15G
        TROVE_MGMT_GATEWAY: "192.168.254.1"
      devstack_local_conf:
        post-config:
          $TROVE_CONF:
            DEFAULT:
              swift_api_insecure: True
              usage_timeout: 2400
            network:
              network_isolation: True
        test-config:
          $TEMPEST_CONFIG:
            auth:
              tempest_roles: ResellerAdmin
            database:
              database_build_timeout: 2400
              default_datastore_versions: mysql:8.0
      devstack_plugins:
        trove: https://opendev.org/openstack/trove.git
      devstack_services:
        etcd3: false
        cinder: true
        c-sch: true
        c-api: true
        c-vol: true
        c-bak: false
        swift: true
        s-account: true
        s-container: true
        s-object: true
        s-proxy: true
        tls-proxy: true
        tempest: true
      tempest_test_regex: ^trove_tempest_plugin\.tests
      tempest_test_timeout: 3600
      zuul_copy_output:
        '/var/log/guest-agent-logs/': 'logs'

- job:
    name: trove-tempest-snapshot
    parent: devstack-tempest
    nodeset: trove-ubuntu-noble
    timeout: 10800
    required-projects:
      - openstack/trove
      - openstack/trove-tempest-plugin
      - openstack/tempest
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^releasenotes/.*$
      - ^test-requirements.txt$
      - ^tox.ini$
      - ^LICENSE$
      - ^contrib/
      - ^zuul\.d/
      - ^\..+
    vars:
      tox_envlist: all
      tempest_concurrency: 1
      devstack_localrc:
        TEMPEST_PLUGINS: /opt/stack/trove-tempest-plugin
        SYNC_LOG_TO_CONTROLLER: True
        TROVE_DATASTORE_VERSION: 8.0
        TROVE_AGENT_CALL_HIGH_TIMEOUT: 1800
        TROVE_MGMT_GATEWAY: "192.168.254.1"
      devstack_local_conf:
        post-config:
          $TROVE_CONF:
            DEFAULT:
              swift_api_insecure: True
              usage_timeout: 2400
              storage_strategy: cinder
          $TROVE_GUESTAGENT_CONF:
            DEFAULT:
              storage_strategy: cinder
        test-config:
          $TEMPEST_CONFIG:
            database:
              database_build_timeout: 2400
              default_datastore_versions: mysql:8.0
      devstack_plugins:
        trove: https://opendev.org/openstack/trove.git
      devstack_services:
        etcd3: false
        cinder: true
        c-sch: true
        c-api: true
        c-vol: true
        c-bak: false
        swift: false
        tls-proxy: true
        tempest: true
      tempest_test_regex: ^trove_tempest_plugin\.tests\.scenario\.(test_cinder_backup|test_replication)
      tempest_test_timeout: 3600
      zuul_copy_output:
        '/var/log/guest-agent-logs/': 'logs'

- job:
    name: trove-tempest-ubuntu-base
    parent: trove-tempest
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^releasenotes/.*$
      - ^test-requirements.txt$
      - ^tox.ini$
      - ^LICENSE$
      - ^contrib/
      - ^zuul\.d/
      - ^backup/
      - ^\..+
      - ^trove/guestagent/strategies/replication/
    vars:
      devstack_services:
        swift: false
        s-account: false
        s-container: false
        s-object: false
        s-proxy: false
      tempest_test_regex: ^trove_tempest_plugin\.tests\.scenario\.test_instance_basic

- job:
    name: trove-tempest-ubuntu-backup
    parent: trove-tempest
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^releasenotes/.*$
      - ^test-requirements.txt$
      - ^tox.ini$
      - ^LICENSE$
      - ^contrib/
      - ^zuul\.d/
      - ^\..+
      - ^trove/guestagent/strategies/replication/
    vars:
      devstack_localrc:
        TROVE_ENABLE_LOCAL_REGISTRY: True
      tempest_test_regex: ^trove_tempest_plugin\.tests\.scenario\.test_backup

- job:
    name: trove-tempest-ubuntu-replication
    parent: trove-tempest
    irrelevant-files:
      - ^.*\.rst$
      - ^api-ref/.*$
      - ^doc/.*$
      - ^etc/.*$
      - ^releasenotes/.*$
      - ^test-requirements.txt$
      - ^tox.ini$
      - ^LICENSE$
      - ^contrib/
      - ^zuul\.d/
      - ^backup/
      - ^\..+
    vars:
      devstack_localrc:
        TROVE_ENABLE_LOCAL_REGISTRY: True
      tempest_test_regex: ^trove_tempest_plugin\.tests\.scenario\.test_replication

- job:
    name: publish-trove-guest-image
    parent: publish-openstack-artifacts
    run: playbooks/image-build/run.yaml
    post-run: playbooks/image-build/post.yaml
    required-projects:
      - openstack/diskimage-builder
      - openstack/trove

- job:
    name: trove-ubuntu-guest-image-build
    run: playbooks/image-build/run.yaml
    nodeset: trove-ubuntu-noble-single
    timeout: 3600
    description: |
      Build Ubuntu noble based image only on ubuntu distro.
    required-projects:
      - openstack/diskimage-builder
      - openstack/trove
    files:
      - ^integration/(scripts|tests)/
    vars:
      guest_os: ubuntu
      guest_os_release: noble
      guest_username: ubuntu
      branch: master
      dev_mode: false
      image_suffix: ""

- job:
    name: publish-trove-guest-image-ubuntu-noble
    parent: publish-trove-guest-image
    description: |
      Build and publish Ubuntu noble based Trove guest image to
      tarballs.openstack.org.
    vars:
      guest_os: ubuntu
      guest_os_release: noble
      guest_username: ubuntu
      branch: master
      dev_mode: false
      image_suffix: ""

- job:
    name: publish-trove-guest-image-ubuntu-noble-dev
    parent: publish-trove-guest-image
    description: |
      Build and publish Ubuntu noble based Trove guest image to
      tarballs.openstack.org.
    vars:
      guest_os: ubuntu
      guest_os_release: noble
      guest_username: ubuntu
      branch: master
      dev_mode: true
      image_suffix: "-dev"

- job:
    name: publish-trove-images-quay
    description: |
      Build and sync trove images to quay.io/openstack.trove.
    pre-run: playbooks/image-build/pre.yaml
    run: playbooks/image-build/docker-registry.yaml
    nodeset: trove-ubuntu-noble-single
    required-projects:
      - openstack/trove
    secrets:
      - trove_quay_io_creds
