- job:
    name: gate-designate-devstack-dsvm
    node: 'devstack-precise || devstack-trusty'

    wrappers:
      - build-timeout:
          timeout: 65
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TIMEOUT=60
          export ENABLED_SERVICES=designate,designate-api,designate-central,designate-sink
          export PROJECTS="openstack/designate $PROJECTS"
          export PROJECTS="openstack/python-designateclient $PROJECTS"

          function pre_test_hook {
              cd /opt/stack/new/designate/contrib/devstack
              ./pre_test_hook.sh
          }
          export -f pre_test_hook

          function post_test_hook {
              cd /opt/stack/new/designate/contrib/devstack
              ./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:
      - devstack-logs
      - console-log

- job:
    name: gate-designate-devstack-dsvm
    node: 'devstack-precise || devstack-trusty'

    wrappers:
      - build-timeout:
          timeout: 65
      - timestamps

    builders:
      - link-logs
      - net-info
      - devstack-checkout
      - shell: |
          #!/bin/bash -xe
          export PYTHONUNBUFFERED=true
          export DEVSTACK_GATE_TIMEOUT=60
          export ENABLED_SERVICES=designate,designate-api,designate-central,designate-sink
          export PROJECTS="openstack/designate $PROJECTS"
          export PROJECTS="openstack/python-designateclient $PROJECTS"

          function pre_test_hook {
              cd /opt/stack/new/designate/contrib/devstack

              if [ -f gate-env.bash ]; then
                source gate-env.bash
              fi

              ./pre_test_hook.sh
          }
          export -f pre_test_hook

          function post_test_hook {
              cd /opt/stack/new/designate/contrib/devstack
              ./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:
      - devstack-logs
      - console-log

Allow env variable customizations in the Designate DevStack gate
Allow env variable customizations in the Designate DevStack gate

Before running the tests, we source gate-env.bash if it exists, allowing
for DevStack env variables to be configured.

Change-Id: Idb9627c92646fb5875cdb95c8e20ea1e8c68198c
