-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeploy_pipeline.sh
executable file
·43 lines (30 loc) · 1.04 KB
/
deploy_pipeline.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh
cd software/
echo "Build NodeJS lambda"
cd lambda-js/
npm run build
echo "Build Kotlin lambda"
cd ../lambda
./gradlew clean build --refresh-dependencies --parallel
echo "Go back to base dir"
cd ../../
echo "Install dependencies from infrastucture/package.json"
cd infrastructure/
npm install
echo "Compile Typescript"
tsc
echo "Setup AWS credentials using IAM user with AdministratorAccess"
aws configure
echo "Bootstrap CDK for all Stages in Pipeline (Account/Region combinations)"
cdk bootstrap
echo "Deploy CDK pipeline to create intial CodeCommit Repository"
cdk deploy CdkPipelineStack
cd ../
echo "Set project origin to CodeCommit in the region of the CodePipeline"
# aws codecommit create-repository --repository-name CdkAppRepo
git remote add origin https://git-codecommit.us-west-2.amazonaws.com/v1/repos/CdkAppRepo
echo "Upload project to CodeCommit Repo"
git add --all
git commit -m "Initial pipeline with alpha and beta stage"
git push --set-upstream origin master
echo "Changes will now build and deploy through CodePipeline"