-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuildspec.yml
45 lines (42 loc) · 1.25 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
40
41
42
43
44
45
version: 0.2
env:
git-credential-helper: yes
variables:
SENTRY_ORG: opacity
SENTRY_PROJECT: storage-node
parameter-store:
SENTRY_AUTH_TOKEN: /storage-node/SENTRY_AUTH_TOKEN
phases:
install:
on-failure: ABORT
commands:
- curl -sL https://sentry.io/get-cli/ | bash
pre_build:
on-failure: ABORT
commands:
- VERSION=`sentry-cli releases propose-version`
- sentry-cli releases new "$VERSION"
- git remote remove origin
- git remote add origin https://github.com/mihaiiorga/storage-node.git
- sentry-cli releases set-commits "$VERSION" --auto --ignore-missing --ignore-empty
- echo "VERSION=$VERSION" >> .env
- echo "GO_ENV=$GO_ENV" >> .env
- echo "IMAGE_TAG=$GO_ENV" >> .env
- echo "AWS_REGION=$AWS_REGION" >> .env
- echo "DEBUG=$DEBUG" >> .env
- docker login --username AWS --password $(aws ecr get-login-password --region $AWS_REGION) 174232317769.dkr.ecr.$AWS_REGION.amazonaws.com
- docker-compose pull
build:
on-failure: ABORT
commands:
- docker-compose build
post_build:
on-failure: ABORT
commands:
- docker-compose push
artifacts:
files:
- "appspec.yml"
- "deploy_scripts/**/*"
- '.env'
- 'docker-compose.yml'