-
Notifications
You must be signed in to change notification settings - Fork 12
/
buildspec.yml
39 lines (35 loc) · 1.64 KB
/
buildspec.yml
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
# All commands below are run from root directory of repository by CodeBuild
version: 0.2
env:
variables:
TF_VAR_region: "ap-southeast-2"
TF_VAR_name: "serverless-node-dynamodb-api"
TF_VAR_kms_key_arns: '["arn:aws:kms:ap-southeast-2:982898479788:key/0ec9686b-13a1-40fc-8256-86e8d3503e9c"]'
TF_VAR_ssm_parameter_arns: '["arn:aws:ssm:ap-southeast-2:982898479788:parameter/shared/*","arn:aws:ssm:ap-southeast-2:982898479788:parameter/serverless-node-dynamodb-api/*"]'
TF_VAR_build_docker_image: "jch254/docker-node-terraform-aws"
TF_VAR_build_docker_tag: "latest"
TF_VAR_buildspec: "buildspec.yml"
TF_VAR_source_location: "https://github.com/jch254/serverless-node-dynamodb-api.git"
TF_VAR_cache_bucket: "603-codebuild-cache/serverless-node-dynamodb-api"
TF_VAR_dns_name: "sls-api.603.nz"
TF_VAR_route53_zone_id: "Z18NTUPI1RKRGC"
TF_VAR_acm_arn: "arn:aws:acm:us-east-1:982898479788:certificate/65811194-cc89-4926-83c3-199c5c0b6e0c"
TF_VAR_build_compute_type: "BUILD_GENERAL1_MEDIUM"
REMOTE_STATE_BUCKET: "603-terraform-remote-state"
parameter-store:
AUTH0_CLIENT_SECRET: "/serverless-node-dynamodb-api/auth0-client-secret"
phases:
install:
commands:
# Workaround until CodeBuild/CodePipeline retains file permissions
- find ./infrastructure -name "*.bash" -exec chmod +x {} \;
- ./infrastructure/install.bash
build:
commands:
- ./infrastructure/deploy-infrastructure.bash
- ./infrastructure/deploy-serverless.bash
cache:
paths:
- "infrastructure/.terraform/modules/**/*"
- "infrastructure/.terraform/plugins/**/*"
- "/usr/local/share/.cache/yarn/v1/**/*"