- job:
    name: pkgdeb-build-openstack-pkg-tools
    node: debian-jessie

    wrappers:
      - build-timeout:
          timeout: 30
      - timestamps

    builders:
    - zuul-git-prep
    - shell: |
          #!/bin/bash

          set -x
          set -e

          sudo cp ${WORKSPACE}/build-tools/pkgos-infra-install-sbuild /usr/sbin
          sudo chmod +x /usr/sbin/pkgos-infra-install-sbuild
          sudo cp ${WORKSPACE}/build-tools/pkgos-infra-build-pkg /usr/bin
          sudo chmod +x /usr/bin/pkgos-infra-build-pkg
          sudo --preserve-env pkgos-infra-install-sbuild
          pkgos-infra-build-pkg

    publishers:
      - console-log

- job:
    name: pkgdeb-publish-openstack-pkg-tools
    node: debian-jessie

    wrappers:
      - build-timeout:
          timeout: 30
      - timestamps

    builders:
    - zuul-git-prep
    - shell: |
          #!/bin/bash

          set -x
          set -e

          sudo cp ${WORKSPACE}/build-tools/pkgos-infra-install-sbuild /usr/sbin
          sudo chmod +x /usr/sbin/pkgos-infra-install-sbuild
          sudo cp ${WORKSPACE}/build-tools/pkgos-infra-build-pkg /usr/bin
          sudo chmod +x /usr/bin/pkgos-infra-build-pkg
          sudo --preserve-env pkgos-infra-install-sbuild
          pkgos-infra-build-pkg

    publishers:
      - deb-pkgs:
          project: deb-openstack-pkg-tools
      - console-log