-
Notifications
You must be signed in to change notification settings - Fork 6
/
buildspec-prod.yml
47 lines (42 loc) · 1.92 KB
/
buildspec-prod.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
40
41
42
43
44
45
46
47
# 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: "buildpipeline-prod"
TF_VAR_kms_key_arns: '["arn:aws:kms:ap-southeast-2:982898479788:key/0ec9686b-13a1-40fc-8256-86e8d3503e9c","arn:aws:kms:ap-southeast-2:982898479788:key/f3ccf6b7-dfc4-42d8-82f5-9e2be385f403"]'
TF_VAR_ssm_parameter_arns: '["arn:aws:ssm:ap-southeast-2:982898479788:parameter/buildpipeline/*","arn:aws:ssm:ap-southeast-2:982898479788:parameter/shared/*"]'
TF_VAR_build_docker_image: "jch254/dind-terraform-aws"
TF_VAR_build_docker_tag: "tf-0.13.7"
TF_VAR_buildspec: "buildspec-prod.yml"
TF_VAR_approval_sns_topic_arn: "arn:aws:sns:ap-southeast-2:982898479788:build-approvals"
TF_VAR_github_repository_owner: "jch254"
TF_VAR_github_repository_name: "buildpipeline"
TF_VAR_github_branch_name: "production"
TF_VAR_dns_name: "buildpipeline-prod.603.nz"
TF_VAR_route53_zone_id: "Z18NTUPI1RKRGC"
TF_VAR_acm_arn: "arn:aws:acm:us-east-1:982898479788:certificate/dfff91b1-8a64-41de-91b4-6e469cc15214"
TF_VAR_cache_bucket: "603-codebuild-cache/buildpipeline-prod"
REMOTE_STATE_BUCKET: "603-terraform-remote-state"
DEPLOY_ENV: "production"
ARTIFACT_ARCHIVE_BUCKET: "buildpipeline-test-artifacts"
APP_SECRET: "4815162342"
parameter-store:
TF_VAR_github_oauth_token: "/shared/github-token"
GA_ID: "/buildpipeline/ga-id-prod"
phases:
install:
commands:
# Workaround until CodeBuild/CodePipeline retains file permissions
- find ./infrastructure -name "*.bash" -exec chmod +x {} \;
pre_build:
commands:
- export APP_VERSION=$CODEBUILD_RESOLVED_SOURCE_VERSION
build:
commands:
- ./infrastructure/deploy-infrastructure.bash
- ./infrastructure/fetch-artifacts.bash
- ./infrastructure/upload-artifacts.bash
cache:
paths:
- 'infrastructure/.terraform/plugins/**/*'