- job-template:
    name: 'training-labs-scripts-{node}'
    node: '{node}'

    builders:
      - zuul-git-prep
      - install-distro-packages
      - revoke-sudo
      - shell:
          #!/bin/bash -xe
          ./tools/generate-labs $ZUUL_REFNAME

    publishers:
      - scp:
          site: 'tarballs.openstack.org'
          files:
            - source: 'build/dist/*'
              target: 'tarballs/training-labs/dist/'
              keep-hierarchy: false
              copy-after-failure: false
      - console-log

- job-template:
    name: 'gate-training-labs-scripts-{node}'
    node: '{node}'

    builders:
      - zuul-git-prep
      - install-distro-packages
      - revoke-sudo
      - shell:
          #!/bin/bash -xe
          ./tools/generate-labs $ZUUL_REFNAME

    publishers:
      - console-log