Browse code

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

Steve Baker authored on 2014/05/05 13:13:39
Showing 2 changed files
... ...
@@ -279,6 +279,23 @@ function create_heat_accounts {
279 279
     fi
280 280
 }
281 281
 
282
+# build_heat_functional_test_image() - Build and upload functional test image
283
+function build_heat_functional_test_image {
284
+    build_dib_pip_repo "$OCC_DIR $OAC_DIR $ORC_DIR $HEAT_CFNTOOLS_DIR"
285
+    local image_name=heat-functional-tests-image
286
+
287
+    # The elements to invoke disk-image-create with
288
+    local image_elements="vm fedora selinux-permissive pypi \
289
+        os-collect-config os-refresh-config os-apply-config heat-cfntools \
290
+        heat-config heat-config-cfn-init heat-config-puppet heat-config-script"
291
+
292
+    # Elements path for tripleo-image-elements and heat-templates software-config
293
+    local elements_path=$TIE_DIR/elements:$HEAT_TEMPLATES_REPO_DIR/hot/software-config/elements
294
+
295
+    disk_image_create_upload "$image_name" "$image_elements" "$elements_path"
296
+    iniset $TEMPEST_CONFIG orchestration image_ref $image_name
297
+}
298
+
282 299
 # Restore xtrace
283 300
 $XTRACE
284 301
 
... ...
@@ -1272,6 +1272,10 @@ if is_service_enabled heat; then
1272 1272
     init_heat
1273 1273
     echo_summary "Starting Heat"
1274 1274
     start_heat
1275
+    if [ "$HEAT_CREATE_TEST_IMAGE" = "True" ]; then
1276
+        echo_summary "Building Heat functional test image"
1277
+        build_heat_functional_test_image
1278
+    fi
1275 1279
 fi
1276 1280
 
1277 1281