summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Herve <therve@redhat.com>2016-07-06 21:43:57 +0200
committerSteve Baker <sbaker@redhat.com>2016-08-08 13:10:03 +1200
commitc3ac439ed232642134778f980bb82e5aeb783bb4 (patch)
tree388047375f33de6df1d18bdb85c4e24d2da9738e
parent2f8253a03a4a82ca01748a46d7ab913587da55cd (diff)
downloadheat-c3ac439ed232642134778f980bb82e5aeb783bb4.tar.gz
Use Fedora 24 base image
This is to fix mitaka CI, which is failing since the heat-test-image rebuild failed. Closes-Bug: #1534026 (cherry picked from commits 150a013597da2605be34a3971430283fc25946da and 59fc53a66c4dec45e4d150bce0a1d674477f710c) Change-Id: Ifaccf340f0ff4eac52b1eeef5914b7e90f2687da
-rwxr-xr-xheat/cloudinit/loguserdata.py10
-rwxr-xr-xheat_integrationtests/prepare_test_env.sh8
2 files changed, 16 insertions, 2 deletions
diff --git a/heat/cloudinit/loguserdata.py b/heat/cloudinit/loguserdata.py
index 0e36d23a2..7d0dbae46 100755
--- a/heat/cloudinit/loguserdata.py
+++ b/heat/cloudinit/loguserdata.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
@@ -11,6 +11,14 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+"true" '''\'
+if hash python3 2>/dev/null; then
+ interpreter="python3"
+else
+ interpreter="python"
+fi
+exec $interpreter "$0"
+'''
import datetime
from distutils import version
diff --git a/heat_integrationtests/prepare_test_env.sh b/heat_integrationtests/prepare_test_env.sh
index 23a4a22b6..de1416b83 100755
--- a/heat_integrationtests/prepare_test_env.sh
+++ b/heat_integrationtests/prepare_test_env.sh
@@ -31,7 +31,13 @@ nova flavor-create m1.heat_int 452 512 0 1
nova flavor-create m1.heat_micro 453 128 0 1
# Register the glance image for testing
-curl http://tarballs.openstack.org/heat-test-image/fedora-heat-test-image.qcow2 | glance image-create --name fedora-heat-test-image --disk-format qcow2 --container-format bare --visibility public
+curl -L https://download.fedoraproject.org/pub/fedora/linux/releases/24/CloudImages/x86_64/images/Fedora-Cloud-Base-24-1.2.x86_64.qcow2 | openstack image create fedora-heat-test-image --disk-format qcow2 --container-format bare --public
+if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
+ # The curl command failed, so the upload is mostly likely incorrect. Let's
+ # bail out early.
+ exit 1
+fi
+
iniset heat_integrationtests.conf DEFAULT image_ref fedora-heat-test-image
iniset heat_integrationtests.conf DEFAULT boot_config_env $DEST/heat-templates/hot/software-config/boot-config/test_image_env.yaml
iniset heat_integrationtests.conf DEFAULT heat_config_notify_script $DEST/heat-templates/hot/software-config/elements/heat-config/bin/heat-config-notify