-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
34 lines (34 loc) · 1.19 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
version: 0.2
env:
variables:
PRX_ECR_CONFIG_PARAMETERS: MetricsEcrImageTag
PRX_SPIRE_ECR_PKG_PARAMETERS: WEB_SERVER=/prx/stag/Spire/Dovetail-Metrics/pkg/docker-image-tag
parameter-store:
CODECOV_TOKEN: /prx/test/metrics.prx.org/CODECOV_TOKEN
DOCKERHUB_USERNAME: /prx/DOCKERHUB_USERNAME
DOCKERHUB_PASSWORD: /prx/DOCKERHUB_PASSWORD
exported-variables:
- PRX_ECR_CONFIG_PARAMETERS
- PRX_ECR_IMAGE
- PRX_SPIRE_ECR_PKG_PARAMETERS
- WEB_SERVER
phases:
pre_build:
commands:
- echo Logging in to Docker Hub...
- echo $DOCKERHUB_PASSWORD | docker login --username $DOCKERHUB_USERNAME --password-stdin
build:
commands:
- echo CODECOV_TOKEN=$CODECOV_TOKEN > .env
- echo CODEBUILD_BUILD_ID=$CODEBUILD_BUILD_ID >> .env
- echo PRX_REPO=$PRX_REPO >> .env
- echo PRX_COMMIT=$PRX_COMMIT >> .env
- echo PRX_BRANCH=$PRX_BRANCH >> .env
- echo PRX_GITHUB_PR=$PRX_GITHUB_PR >> .env
- docker-compose build
- docker-compose run metrics ci
post_build:
commands:
- curl -sO "https://raw.githubusercontent.com/PRX/Infrastructure/main/ci/utility/post_build.sh"
- chmod +x post_build.sh
- . ./post_build.sh