-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7a7b2be
commit b542ca6
Showing
9 changed files
with
481 additions
and
5,338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,10 @@ | ||
|
||
set -e | ||
|
||
help='This script is run with the format ./output.sh <target service name> <serverless output variable name> <stage name (optional, default dev)>' | ||
example='ex. ./output.sh ui CloudFrontEndpointUrl' | ||
help='This script is run with the format ./output.sh <target stack name> <cloudformation output variable name>' | ||
example='ex. ./output.sh seds-cmdct-4184-cdk CloudFrontUrl' | ||
|
||
: ${1?ERROR: 'You must specify the target service.' | ||
$help | ||
$example} | ||
: ${2?ERROR: "You must specify the variable you want to fetch from serverless' output" | ||
$help | ||
$example} | ||
|
||
service=${1} | ||
stack_name=${1} | ||
output=${2} | ||
stage=${3} | ||
|
||
if [ $output == "url" ]; then | ||
output="CloudFrontEndpointUrl" | ||
fi | ||
|
||
cd $service | ||
serverless info --stage $stage --json | jq --raw-output --arg output $output '.outputs[] | select(.OutputKey == $output) | .OutputValue' | ||
cd .. | ||
aws cloudformation describe-stacks --stack-name $stack_name --query "Stacks[0].Outputs[?OutputKey=='$output'].OutputValue" --output text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.