- job-template:
    name: 'gate-dib-dsvm-functests-{node}'
    node: '{node}'

    builders:
      - gerrit-git-prep
      - shell: |
          #!/bin/bash -eux
          cd ~
          /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
            git://git.openstack.org \
            openstack/diskimage-builder \
            openstack/dib-utils

          export PATH=$PATH:$(pwd)/dib-utils/bin
          export PATH=$PATH:$(pwd)/diskimage-builder/bin

          ./diskimage-builder/tests/install_test_deps.sh
          ./diskimage-builder/tests/run_functests.sh

    publishers:
      - console-log

- job-template:
    name: 'gate-dib-dsvm-functests-{node}'
    node: '{node}'

    builders:
      - gerrit-git-prep
      - shell: |
          #!/bin/bash -eux
          cd ~

          # Work around a bug where we get a disconnected HEAD ref if we dont clone with git first
          git clone file:///opt/git/openstack/diskimage-builder openstack/diskimage-builder
          git clone file:///opt/git/openstack/dib-utils openstack/dib-utils

          /usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
            git://git.openstack.org \
            openstack/diskimage-builder \
            openstack/dib-utils

          export PATH=$PATH:$(pwd)/dib-utils/bin
          export PATH=$PATH:$(pwd)/diskimage-builder/bin

          ./diskimage-builder/tests/install_test_deps.sh
          ./diskimage-builder/tests/run_functests.sh

    publishers:
      - console-log

Clone DIB repos with git before zuul-cloner
Clone DIB repos with git before zuul-cloner

Work around a bug causing zuul-cloner to explode when cleaning up the
DIB git repos.

Change-Id: I4c21122f3e1a6c64480c66daf3c69b5a22b9eff1
