From 63323dc8f73899d0ef079d78f467885e982a5f6b Mon Sep 17 00:00:00 2001 From: Jan Alfred Richter Date: Sat, 29 Aug 2020 22:46:13 +1200 Subject: [PATCH] feat: support for no-fail-empty-changeset flag --- README.md | 2 ++ entrypoint.sh | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ae7793..fdf1898 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,8 @@ jobs: * Type: `boolean` * `USE_JSON` - [Optional]. Whether to use JSON instead of YML as the output template format. * Type: `boolean` +* `NO_FAIL_EMPTY_CHANGESET` - [Optional]. Whether to fail if there are no changes to the workload. + * Type: `boolean` * `PARAMETER_OVERRIDES` - [Optional]. Parameters to input in the template. * Type: `string | list[string]` * Syntax: `AliasName=prod` `AliasName=prod ApiUrl=https://api.com/api/v1` diff --git a/entrypoint.sh b/entrypoint.sh index a09489f..ac7870e 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -46,6 +46,10 @@ if [[ $FORCE_UPLOAD == true ]]; then FORCE_UPLOAD="--force-upload" fi +if [[ $NO_FAIL_EMPTY_CHANGESET == true ]]; then + NO_FAIL_EMPTY_CHANGESET="--no-fail-on-empty-changeset" +fi + if [[ $USE_JSON == true ]]; then USE_JSON="--use-json" fi @@ -78,4 +82,4 @@ output = text region = $AWS_REGION" > ~/.aws/config aws cloudformation package --template-file $TEMPLATE --output-template-file serverless-output.yaml --s3-bucket $AWS_DEPLOY_BUCKET $AWS_BUCKET_PREFIX $FORCE_UPLOAD $USE_JSON -aws cloudformation deploy --template-file serverless-output.yaml --stack-name $AWS_STACK_NAME $CAPABILITIES $PARAMETER_OVERRIDES $TAGS +aws cloudformation deploy --template-file serverless-output.yaml --stack-name $AWS_STACK_NAME $CAPABILITIES $PARAMETER_OVERRIDES $TAGS $NO_FAIL_EMPTY_CHANGESET