Skip to content

Commit f755bcf

Browse files
committed
add entrypoint helper
1 parent 460c51f commit f755bcf

File tree

2 files changed

+35
-2
lines changed

2 files changed

+35
-2
lines changed

.config/functional_tests/post-entrypoint-helpers.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,14 @@
33
## Use this to load any configurations after the functional test
44
## TIPS: avoid modifying the .project_automation/functional_test/entrypoint.sh
55
## migrate any customization you did on entrypoint.sh to this helper script
6-
echo "Executing Post-Entrypoint Helpers"
6+
echo "Executing Post-Entrypoint Helpers"
7+
8+
#********** Project Path *************
9+
PROJECT_PATH=${BASE_PATH}/project
10+
PROJECT_TYPE_PATH=${BASE_PATH}/projecttype
11+
cd ${PROJECT_PATH}
12+
13+
#********** CLEANUP *************
14+
echo "Cleaning up all temp files and artifacts"
15+
cd ${PROJECT_PATH}
16+
make -s clean

.config/functional_tests/pre-entrypoint-helpers.sh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,27 @@
33
## use this to load any configuration before the functional test
44
## TIPS: avoid modifying the .project_automation/functional_test/entrypoint.sh
55
## migrate any customization you did on entrypoint.sh to this helper script
6-
echo "Executing Pre-Entrypoint Helpers"
6+
echo "Executing Pre-Entrypoint Helpers"
7+
8+
#********** Project Path *************
9+
PROJECT_PATH=${BASE_PATH}/project
10+
PROJECT_TYPE_PATH=${BASE_PATH}/projecttype
11+
cd ${PROJECT_PATH}
12+
13+
#********** TFC Env Vars *************
14+
export AWS_DEFAULT_REGION=us-east-1
15+
export TFE_TOKEN=`aws secretsmanager get-secret-value --secret-id abp/tfc/token | jq -r ".SecretString"`
16+
export TF_TOKEN_app_terraform_io=`aws secretsmanager get-secret-value --secret-id abp/tfc/token | jq -r ".SecretString"`
17+
18+
#********** MAKEFILE *************
19+
echo "Build the lambda function packages"
20+
make all
21+
22+
#********** Get tfvars from SSM *************
23+
echo "Get *.tfvars from SSM parameter"
24+
aws ssm get-parameter \
25+
--name "/abp/tfc/functional/tfc_org/terraform_test.tfvars" \
26+
--with-decryption \
27+
--query "Parameter.Value" \
28+
--output "text" \
29+
--region "us-east-1" >> ./tests/terraform.auto.tfvars

0 commit comments

Comments
 (0)