-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathdeploy
More file actions
executable file
·28 lines (24 loc) · 889 Bytes
/
deploy
File metadata and controls
executable file
·28 lines (24 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bash
set -e
cat << EOF
===================================================
scripts/deploy
===================================================
EOF
ENV_FILE_PATH=$1
source $ENV_FILE_PATH
TEMPLATE=".sam/packaged-$CODEBUILD_PROJECT_NAME.yml"
CFN_STACK_NAME="$CODEBUILD_PROJECT_NAME"
# deploy
aws cloudformation deploy \
--template-file "$TEMPLATE" \
--stack-name "$CFN_STACK_NAME" \
--capabilities "CAPABILITY_IAM" \
--parameter-overrides GitHubRepositoryUrl=$GITHUB_REPOSITORY_URL \
GitHubPersonalAccessToken=$GITHUB_PERSONAL_ACCESS_TOKEN \
GitHubTargetResource=$GITHUB_TARGET_RESOURCE \
GitHubIgnoreBranchRegex="$GITHUB_IGNORE_BRANCH_REGEX" \
CodeBuildProjectName=$CODEBUILD_PROJECT_NAME \
CodeBuildRegion=$CODEBUILD_PROJECT_REGION \
BuildSkippedBy="$BUILD_SKIPPED_BY" \
--region "$AWS_DEFAULT_REGION"