- job-template:
    name: 'gate-{name}-openstack-ansible-{scenario}-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 90
      - timestamps

    builders:
      - print-template-name:
          template-name: "{template-name}"
      - zuul-git-prep
      - shell: |
          #!/bin/bash -xe
          sudo scripts/gate-check-commit.sh "{scenario}"

    publishers:
      - devstack-logs
      - console-log

- job-template:
    name: 'periodic-openstack-ansible-{action}-{scenario}-{branch-name}-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 240
      - timestamps

    builders:
      - print-template-name:
          template-name: "{template-name}"
      - zuul-git-branch-prep-upper-constraints:
          branch: '{branch}'
      - shell: |
          #!/bin/bash -xe
          sudo scripts/gate-check-commit.sh "{scenario}" "{action}"

    publishers:
      - devstack-logs
      - console-log

- job-template:
    name: 'gate-{name}-openstack-ansible-{scenario}-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 90
      - timestamps

    builders:
      - print-template-name:
          template-name: "{template-name}"
      - zuul-git-prep
      - shell: |
          #!/bin/bash -xe
          sudo ZUUL_BRANCH=$ZUUL_BRANCH \
               ZUUL_CHANGE=$ZUUL_CHANGE \
               ZUUL_CHANGES=$ZUUL_CHANGES \
               ZUUL_CHANGE_IDS=$ZUUL_CHANGE_IDS \
               ZUUL_PATCHSET=$ZUUL_PATCHSET \
               scripts/gate-check-commit.sh "{scenario}"

    publishers:
      - devstack-logs
      - console-log

- job-template:
    name: 'periodic-openstack-ansible-{action}-{scenario}-{branch-name}-{node}{suffix}'
    node: '{node}'

    wrappers:
      - build-timeout:
          timeout: 240
      - timestamps

    builders:
      - print-template-name:
          template-name: "{template-name}"
      - zuul-git-branch-prep-upper-constraints:
          branch: '{branch}'
      - shell: |
          #!/bin/bash -xe
          sudo scripts/gate-check-commit.sh "{scenario}" "{action}"

    publishers:
      - devstack-logs
      - console-log

Enable cross-repo testing for integration testing
OSA: Enable cross-repo testing for integration testing

The ZUUL_* environment variables are not set when the job
is executed using sudo. Instead of using 'sudo -E' which
would pass along a whole bunch of env vars which may
interfere with the build, we only do a minimal set in
order to enable cross-repository testing.

Change-Id: If9c8bcb0069d6d7e45ac2a484f3bb97dbf80772b
