From d33ea5beb6ce789f91acd3815c23db5ac4d60130 Mon Sep 17 00:00:00 2001 From: YutaOkoshi <37532269+YutaOkoshi@users.noreply.github.com> Date: Fri, 27 Sep 2024 18:19:06 +0900 Subject: [PATCH] fix(deploy-cfn-script): add S3_PATH param (#634) --- docs/Deployment/getting-started.md | 2 +- scripts/deploy-cloudformation-stacks.sh | 12 +++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/Deployment/getting-started.md b/docs/Deployment/getting-started.md index f70cff742..0b7589423 100644 --- a/docs/Deployment/getting-started.md +++ b/docs/Deployment/getting-started.md @@ -162,5 +162,5 @@ All the others will work by default, take the time to read and decide which para This script deploys the retail demo store with standard options, you cannot change any parameters directly ```bash - ./scripts/deploy-cloudformation-stacks.sh DEPLOYMENT_S3_BUCKET REGION STACK_NAME + ./scripts/deploy-cloudformation-stacks.sh DEPLOYMENT_S3_BUCKET S3_PATH REGION STACK_NAME ``` diff --git a/scripts/deploy-cloudformation-stacks.sh b/scripts/deploy-cloudformation-stacks.sh index 4ed6c6e40..ea39e6303 100755 --- a/scripts/deploy-cloudformation-stacks.sh +++ b/scripts/deploy-cloudformation-stacks.sh @@ -4,7 +4,7 @@ # You can use the following flags to pre create resources # # Example usage -# ./scripts/deploy-cloudformation-stacks.sh S3_BUCKET REGION [--pre-create-personalize] [--pre-index-elasticsearch] +# ./scripts/deploy-cloudformation-stacks.sh S3_BUCKET S3_PATH REGION STACK_NAME [--pre-create-personalize] [--pre-index-elasticsearch] # set -e @@ -13,7 +13,7 @@ set -e # Parse arguments and flag ######################################################################################################################################## # The script parses the command line argument and extract these variables: -# 1. "args" contains an array of arguments (e.g. args[0], args[1], etc.) In this script, we use only 2 arguments (S3_BUCKET, REGION) +# 1. "args" contains an array of arguments (e.g. args[0], args[1], args[2], args[3], etc.) In this script, we use only 3 arguments (S3_BUCKET, S3_PATH, REGION, STACK_NAME) # 2. "pre_create_personalize" contains a boolean value whether "--pre-create-personalize" is presented # 3. "pre_index_elasticsearch" contains a boolean value whether "--pre-index-elasticsearch" is presented ######################################################################################################################################## @@ -56,13 +56,15 @@ do done S3_BUCKET=${args[0]} -REGION=${args[1]} -STACK_NAME=${args[2]} +S3_PATH=${args[1]} +REGION=${args[2]} +STACK_NAME=${args[3]} echo "==============================================" echo "Executing the script with following arguments:" echo "==============================================" echo "S3_BUCKET = ${S3_BUCKET}" +echo "S3_PATH = ${S3_PATH}" echo "pre_create_personalize = ${pre_create_personalize}" echo "pre_index_elasticsearch = ${pre_index_elasticsearch}" echo "==============================================" @@ -88,7 +90,7 @@ aws cloudformation deploy \ SourceDeploymentType="S3" \ AlexaSkillId="" \ AlexaDefaultSandboxEmail="" \ - ResourceBucketRelativePath="store/" \ + ResourceBucketRelativePath="${S3_PATH}/" \ mParticleSecretKey="" \ AmazonPayPublicKeyId="" \ mParticleApiKey="" \