From d480e8746512caf8821c42582e7ab75d25b3127b Mon Sep 17 00:00:00 2001 From: mbeierl Date: Thu, 5 Nov 2015 21:22:54 -0500 Subject: Adding Heat template for staging StorPerf master node Change-Id: I1e55290013f31272952f23869a02d68ca08cd4a7 JIRA: STORPERF-12 Signed-off-by: mbeierl --- ci/daily.sh | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'ci/daily.sh') diff --git a/ci/daily.sh b/ci/daily.sh index 06bd986..0cc5977 100755 --- a/ci/daily.sh +++ b/ci/daily.sh @@ -1,2 +1,36 @@ -#!/bin/bash +#!/bin/bash -x +############################################################################## +# Copyright (c) 2015 EMC and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +if [ -f ~/jenkins-os.rc ] +then + . ~/jenkins-os.rc +fi + +if [ -z $WORKSPACE ] +then + WORKSPACE=`pwd` +fi + +function stage_base_os_in_glance { + + export OS_IMAGE_API_VERSION=1 + + glance image-list | grep "$1" + if [ $? -eq 1 ] + then + curl -s -o $WORKSPACE/$1.qcow2 https://cloud-images.ubuntu.com/releases/15.10/release/ubuntu-15.10-server-cloudimg-amd64-disk1.img + glance image-create --name="$1" --disk-format=qcow2 --container-format=bare < $WORKSPACE/$1.qcow2 + fi + +} + +stage_base_os_in_glance ubuntu-server + exit 0 -- cgit 1.2.3-korg