-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathbuildspec.yml
More file actions
38 lines (34 loc) · 1.33 KB
/
Copy pathbuildspec.yml
File metadata and controls
38 lines (34 loc) · 1.33 KB
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
# All commands below are run from root directory of repository by CodeBuild
version: 0.2
env:
variables:
AWS_DEFAULT_REGION: "ap-southeast-4"
REMOTE_STATE_BUCKET: "jch254-terraform-remote-state"
TF_STATE_KEY: "serverless-node-dynamodb-api"
NODE_OPTIONS: "--max-old-space-size=3072"
AUTH0_DOMAIN: "603.au.auth0.com"
AUTH0_CLIENT_ID: "PabWYDl71ibZ920e3XjoPIe0QoJVrhtY"
parameter-store:
CLOUDFLARE_API_TOKEN: "/serverless-node-dynamodb-api/cloudflare-api-token"
SERVERLESS_LICENSE_KEY: "/serverless-node-dynamodb-api/serverless-license-key"
phases:
install:
commands:
- echo Setting up Terraform plugin cache...
- export TF_PLUGIN_CACHE_DIR="$HOME/.terraform.d/plugin-cache"
- mkdir -p "$TF_PLUGIN_CACHE_DIR"
# Workaround until CodeBuild/CodePipeline retains file permissions
- find ./infrastructure -name "*.bash" -exec chmod +x {} \;
- echo Installing Node dependencies...
- corepack enable
- corepack prepare pnpm@9.15.9 --activate
- ./infrastructure/install.bash
build:
commands:
- ./infrastructure/deploy-infrastructure.bash
- ./infrastructure/deploy-serverless.bash
cache:
paths:
- "infrastructure/terraform/.terraform/modules/**/*"
- "infrastructure/terraform/.terraform/plugins/**/*"
- "/root/.terraform.d/plugin-cache/**/*"