From 3d781d7e6add31fc3729de3ad7fed1e720c8756d Mon Sep 17 00:00:00 2001 From: pmikus Date: Tue, 7 Sep 2021 09:27:29 +0000 Subject: Terraform: Add job name as VPC ID Signed-off-by: pmikus Change-Id: I82819c924012c966ba91fdf39ffba500ee0ce6b0 --- resources/libraries/bash/function/common.sh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'resources/libraries/bash') diff --git a/resources/libraries/bash/function/common.sh b/resources/libraries/bash/function/common.sh index ff632a2e97..e56799e63c 100644 --- a/resources/libraries/bash/function/common.sh +++ b/resources/libraries/bash/function/common.sh @@ -606,6 +606,7 @@ function prepare_topology () { # Prepare virtual testbed topology if needed based on flavor. # Variables read: + # - TEST_CODE - String affecting test selection, usually jenkins job name. # - NODENESS - Node multiplicity of testbed, either "2n" or "3n". # - FLAVOR - Node flavor string, e.g. "clx" or "skx". # Functions called: @@ -618,10 +619,12 @@ function prepare_topology () { case_text="${NODENESS}_${FLAVOR}" case "${case_text}" in "2n_aws") + export TF_VAR_testbed_name="${TEST_CODE}" terraform_init || die "Failed to call terraform init." terraform_apply || die "Failed to call terraform apply." ;; "3n_aws") + export TF_VAR_testbed_name="${TEST_CODE}" terraform_init || die "Failed to call terraform init." terraform_apply || die "Failed to call terraform apply." ;; -- cgit 1.2.3-korg