From 2a6009cd00c73b187f0cbd3541361c7d46837856 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Mon, 5 May 2014 16:13:39 +1200 Subject: [PATCH] Build an image for heat functional tests This is only triggered if HEAT_CREATE_TEST_IMAGE is True This custom image contains the following: * heat-cfntools from git rather than the packaged version, which will allow gating on heat-cfntools changes * os-collect-config, os-apply-config, os-refresh-config, which will allow gating on these projects, and will allow heat software-config tests to be written * software-config hooks from heat-templates, which will allow tempest tests to be written for software-config with different configuration tools (script, puppet, cfn-init etc) The heat functional tests will soon replace the heat-slow tempest job, so heat-slow tempest configuration will be removed after the heat functional test job is gating. Change-Id: I2e0490c1662a184d4c6d8c7e9ebb128e1912f1b0 --- lib/heat | 17 +++++++++++++++++ stack.sh | 4 ++++ 2 files changed, 21 insertions(+) diff --git a/lib/heat b/lib/heat index 185f2dfb08..bd99d6b9f9 100644 --- a/lib/heat +++ b/lib/heat @@ -279,6 +279,23 @@ function create_heat_accounts { fi } +# build_heat_functional_test_image() - Build and upload functional test image +function build_heat_functional_test_image { + build_dib_pip_repo "$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR" + local image_name=heat-functional-tests-image + + # The elements to invoke disk-image-create with + local image_elements="vm fedora selinux-permissive pypi \ + os-collect-config os-refresh-config os-apply-config heat-cfntools \ + heat-config heat-config-cfn-init heat-config-puppet heat-config-script" + + # Elements path for tripleo-image-elements and heat-templates software-config + local elements_path=$TIE_DIR/elements:$HEAT_TEMPLATES_REPO_DIR/hot/software-config/elements + + disk_image_create_upload "$image_name" "$image_elements" "$elements_path" + iniset $TEMPEST_CONFIG orchestration image_ref $image_name +} + # Restore xtrace $XTRACE diff --git a/stack.sh b/stack.sh index 670d8c3398..71c661d6c0 100755 --- a/stack.sh +++ b/stack.sh @@ -1272,6 +1272,10 @@ if is_service_enabled heat; then init_heat echo_summary "Starting Heat" start_heat + if [ "$HEAT_CREATE_TEST_IMAGE" = "True" ]; then + echo_summary "Building Heat functional test image" + build_heat_functional_test_image + fi fi