From f0f1463aae1708793f437f18ec6dcc86b6d81bd5 Mon Sep 17 00:00:00 2001 From: Sam Betts Date: Wed, 30 Mar 2016 15:35:21 +0100 Subject: [PATCH] Add post job for building and uploading tinyipa Ironic currently automatically builds and uploads a coreos based IPA image so that CI jobs don't have to build it every time and so that people wanting to use Ironic don't have to always build their own. This patch adds a job to also build the tinyipa version of IPA, so that we can get the same optimisations. Depends-On: I9d879689c8e88768aaa96d0033b62d062f9cdc27 Change-Id: I56688bbb3efd5b5a0a14570f4b9733a76d31b71b --- jenkins/jobs/ironic-python-agent-jobs.yaml | 31 +++++++++++++++++----- jenkins/jobs/projects.yaml | 4 +++ zuul/layout.yaml | 1 + 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/jenkins/jobs/ironic-python-agent-jobs.yaml b/jenkins/jobs/ironic-python-agent-jobs.yaml index 24c8a45505..b7ed34bcc2 100644 --- a/jenkins/jobs/ironic-python-agent-jobs.yaml +++ b/jenkins/jobs/ironic-python-agent-jobs.yaml @@ -13,8 +13,8 @@ publishers: - console-log -- job: - name: 'ironic-python-agent-buildimage-coreos' +- job-template: + name: 'ironic-python-agent-buildimage-{image-type}' node: ubuntu-trusty builders: @@ -26,19 +26,36 @@ #!/bin/bash -xe BRANCH=$ZUUL_REFNAME export BRANCH_PATH=`echo $BRANCH | tr / -` - imagebuild/coreos/full_trusty_build.sh + + mkdir UPLOAD_RAW + mkdir UPLOAD_TAR + + type="{image-type}" + case $type in + tinyipa) + export BUILD_AND_INSTALL_TINYIPA=true + (cd imagebuild/tinyipa && make) + mv imagebuild/tinyipa/tinyipa*.tar.gz UPLOAD_TAR + mv imagebuild/tinyipa/tinyipa*.* UPLOAD_RAW + ;; + coreos) + imagebuild/coreos/full_trusty_build.sh + mv imagebuild/coreos/UPLOAD/coreos_production_pxe* UPLOAD_RAW + mv ipa-coreos*.tar.gz UPLOAD_TAR + ;; + esac publishers: - scp: site: 'tarballs.openstack.org' files: - - source: 'imagebuild/coreos/UPLOAD/coreos_production_pxe*' - target: 'tarballs/ironic-python-agent/coreos/files/' + - source: 'UPLOAD_RAW/*' + target: 'tarballs/ironic-python-agent/{image-type}/files/' keep-hierarchy: false copy-after-failure: false - - source: 'ipa-coreos*.tar.gz' - target: 'tarballs/ironic-python-agent/coreos' + - source: 'UPLOAD_TAR/*' + target: 'tarballs/ironic-python-agent/{image-type}/' keep-hierarchy: false copy-after-failure: false - console-log diff --git a/jenkins/jobs/projects.yaml b/jenkins/jobs/projects.yaml index fa1ceca308..439b12a77c 100644 --- a/jenkins/jobs/projects.yaml +++ b/jenkins/jobs/projects.yaml @@ -2579,6 +2579,10 @@ job-suffix: '-nv' branch-override: default ramdisk: 'ipa-src' + - 'ironic-python-agent-buildimage-{image-type}': + image-type: coreos + - 'ironic-python-agent-buildimage-{image-type}': + image-type: tinyipa - project: name: ironic-specs diff --git a/zuul/layout.yaml b/zuul/layout.yaml index e462bcefcd..80aac58880 100755 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -6579,6 +6579,7 @@ projects: - gate-tempest-dsvm-ironic-pxe_ipa-src post: - ironic-python-agent-buildimage-coreos + - ironic-python-agent-buildimage-tinyipa - name: openstack/ironic-specs template: