- job:
    name: gate-app-catalog-ui-dsvm-integration
    node: ubuntu-xenial

    wrappers:
      - build-timeout:
          timeout: 60
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - firefox-install
      - xvfb-install
      - local_conf:
          conf: |
            [[local|localrc]]
            enable_plugin app-catalog-ui https://git.openstack.org/openstack/app-catalog-ui
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TEMPEST=0
          export DEVSTACK_GATE_EXERCISES=0
          export DEVSTACK_GATE_INSTALL_TESTONLY=1
          export DEVSTACK_GATE_NEUTRON=1

          # Enable App Catalog Horizon plugin
          export PROJECTS="openstack/app-catalog-ui $PROJECTS"

          function pre_test_hook {
              $BASE/new/app-catalog-ui/tools/gate/integration/pre_test_hook.sh
          }
          export -f pre_test_hook

          function post_test_hook {
              $BASE/new/app-catalog-ui/tools/gate/integration/post_test_hook.sh
          }
          export -f post_test_hook

          cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
          ./safe-devstack-vm-gate-wrap.sh

    publishers:
      - test-results
      - devstack-logs
      - publish-screenshots
      - console-log

- publisher:
    name: publish-screenshots
    publishers:
      - scp:
          site: 'static.openstack.org'
          files:
            - target: 'logs/$LOG_PATH/screenshots'
              source: 'integration_tests_screenshots/**'
              copy-after-failure: true