-
Notifications
You must be signed in to change notification settings - Fork 3
/
buildspec.yml
68 lines (65 loc) · 2.16 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
## Used in AWS CodeBuild, called by AWS CodePipeline.
# Docs: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
# Requires the following environment variables set in CodeBuild:
# ACCOUNT: the account ID of the federated user (changes between SIT, UAT, and PROD)
# REGION: so far, us-east-1
version: 0.2
env:
shell: bash
batch:
fast-fail: false
build-list:
- identifier: app
debug-session: false
env:
variables:
REPOSITORY_NAME: meditor/meditor_ui
PACKAGE_PATH: packages/app
ignore-failure: false
- identifier: docs
debug-session: false
env:
variables:
REPOSITORY_NAME: meditor/meditor_docs
PACKAGE_PATH: packages/docs
ignore-failure: false
- identifier: legacy_api
debug-session: false
env:
variables:
REPOSITORY_NAME: meditor/meditor_server
PACKAGE_PATH: packages/legacy-api
ignore-failure: false
- identifier: notebook_viewer
debug-session: false
env:
variables:
REPOSITORY_NAME: meditor/meditor_notebookviewer
PACKAGE_PATH: packages/notebook-viewer
ignore-failure: false
- identifier: notifier
debug-session: false
env:
variables:
REPOSITORY_NAME: meditor/meditor_notifier
PACKAGE_PATH: packages/notifier
ignore-failure: false
- identifier: proxy
debug-session: false
env:
variables:
REPOSITORY_NAME: meditor/meditor_proxy
PACKAGE_PATH: packages/proxy
ignore-failure: false
phases:
pre_build:
commands:
- VERSION=$(./get_package_version.sh)
- aws ecr get-login-password --region $REGION | docker login --username AWS --password-stdin $ACCOUNT.dkr.ecr.$REGION.amazonaws.com
build:
commands:
- docker build -t $REPOSITORY_NAME:${VERSION} $PACKAGE_PATH --build-arg REGISTRY=$ACCOUNT.dkr.ecr.$REGION.amazonaws.com/
- docker tag $REPOSITORY_NAME:${VERSION} $ACCOUNT.dkr.ecr.$REGION.amazonaws.com/$REPOSITORY_NAME:${VERSION}
post_build:
commands:
- docker push $ACCOUNT.dkr.ecr.$REGION.amazonaws.com/$REPOSITORY_NAME:${VERSION}