- job:
    name: 'gate-ironic-python-agent-buildimage-coreos'
    node: ubuntu-trusty

    builders:
      - link-logs
      - net-info
      - gerrit-git-prep
      - install-distro-packages
      - shell: |
          imagebuild/coreos/full_trusty_build.sh

    publishers:
      - console-log

- job:
    name: 'ironic-python-agent-buildimage-coreos'
    node: ubuntu-trusty

    builders:
      - link-logs
      - net-info
      - gerrit-git-prep
      - install-distro-packages
      - shell: |
          imagebuild/coreos/full_trusty_build.sh


    publishers:
      - scp:
          site: 'tarballs.openstack.org'
          files:
            - source: 'imagebuild/coreos/UPLOAD/coreos_production_pxe.vmlinuz'
              target: 'tarballs/ironic-python-agent/coreos/files'
              keep-hierarchy: false
              copy-after-failure: false
            - source: 'imagebuild/coreos/UPLOAD/coreos_production_pxe_image-oem.cpio.gz'
              target: 'tarballs/ironic-python-agent/coreos/files'
              keep-hierarchy: false
              copy-after-failure: false
            - source: 'ipa-coreos.tar.gz'
              target: 'tarballs/ironic-python-agent/coreos'
              keep-hierarchy: false
              copy-after-failure: false
      - console-log

- job:
    name: 'gate-ironic-python-agent-buildimage-coreos'
    node: ubuntu-trusty

    builders:
      - link-logs
      - net-info
      - gerrit-git-prep
      - install-distro-packages
      - shell: |
          imagebuild/coreos/full_trusty_build.sh

    publishers:
      - console-log

- job:
    name: 'ironic-python-agent-buildimage-coreos'
    node: ubuntu-trusty

    builders:
      - link-logs
      - net-info
      - gerrit-git-prep
      - install-distro-packages
      - shell: |
          #!/bin/bash -xe
          BRANCH=$ZUUL_REFNAME
          BRANCH_PATH=`echo $BRANCH | tr / -`
          imagebuild/coreos/full_trusty_build.sh


    publishers:
      - scp:
          site: 'tarballs.openstack.org'
          files:
            - source: 'imagebuild/coreos/UPLOAD/coreos_production_pxe*'
              target: 'tarballs/ironic-python-agent/coreos/files/'
              keep-hierarchy: false
              copy-after-failure: false
            - source: 'ipa-coreos*.tar.gz'
              target: 'tarballs/ironic-python-agent/coreos'
              keep-hierarchy: false
              copy-after-failure: false
      - console-log

Refactor IPA post jobs to handle branches
Refactor IPA post jobs to handle branches

This commit changes an ironic-python-agent job that builds a ramdisk
from source and uploads to tarballs.o.o. It now:

* Passes the branch name and branch "path" into the image builder

* Uses blobs to select the files for upload; this should have no change
  on the job until the build script is refactored to add the branch name
  to the file names, after which the correct branch will be in the
  filenames, and the blobs will be needed to match correctly.

A future change to ironic-python-agent will put the branch name in the
file names such that users (and devstack) can fetch a ramdisk
corresponding to the stable branch they desire.

Change-Id: I540d2f139c80bb7f382315258dbe3a7a14be74c8
Partial-Bug: #1561756
