-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildspec.yml
59 lines (52 loc) · 3.88 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
version: 0.2
# Pre-requisites
# - Create CodeBuild project
# - Provide minimal github credentials to access public repo
phases:
pre_build:
on-failure: ABORT
commands:
- export CODEARTIFACT_AUTH_TOKEN=`aws codeartifact get-authorization-token --domain cdlib-uc3-mrt --domain-owner $AWS_ACCOUNT_ID --region $AWS_REGION --query authorizationToken --output text`
- aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin ${ECR_REGISTRY}
- aws ecr create-repository --repository-name merritt-tomcat || echo 'ignore if exists...'
- aws ecr create-repository --repository-name merritt-maven || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mock-merritt-it || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-it-database || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-it-database-audit-replic || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-minio-it || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-minio-it-with-content || echo 'ignore if exists...'
- aws ecr create-repository --repository-name fakesmtp || echo 'ignore if exists...'
- aws ecr create-repository --repository-name callback || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-opendj || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-init || echo 'ignore if exists...'
- aws ecr create-repository --repository-name mrt-database || echo 'ignore if exists...'
build:
on-failure: ABORT
commands:
- docker-compose -f mrt-inttest-services/merritt-tomcat/docker-compose.yml build
- docker-compose -f mrt-inttest-services/merritt-tomcat/docker-compose.yml push
- docker-compose -f mrt-inttest-services/merritt-maven/docker-compose.yml build
- docker-compose -f mrt-inttest-services/merritt-maven/docker-compose.yml push
- docker-compose -f mrt-inttest-services/mock-merritt-it/docker-compose.yml build
- docker-compose -f mrt-inttest-services/mock-merritt-it/docker-compose.yml push
- docker-compose -f mrt-inttest-services/mrt-it-database/docker-compose.yml build
- docker-compose -f mrt-inttest-services/mrt-it-database/docker-compose.yml push
- docker-compose -f mrt-inttest-services/mrt-it-database/docker-compose-audit-replic.yml build
- docker-compose -f mrt-inttest-services/mrt-it-database/docker-compose-audit-replic.yml push
- docker-compose -f mrt-inttest-services/mrt-minio-it/docker-compose.yml build
- docker-compose -f mrt-inttest-services/mrt-minio-it/docker-compose.yml push
- docker-compose -f mrt-inttest-services/mrt-minio-it-with-content/docker-compose.yml build
- docker-compose -f mrt-inttest-services/mrt-minio-it-with-content/docker-compose.yml push
- docker-compose -f mrt-inttest-services/fakesmtp/docker-compose.yml build
- docker-compose -f mrt-inttest-services/fakesmtp/docker-compose.yml push
- docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/mrt-database mrt-services/mysql
- docker push ${ECR_REGISTRY}/mrt-database
- docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/mrt-opendj mrt-services/ldap
- docker push ${ECR_REGISTRY}/mrt-opendj
- docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/mrt-init mrt-services/merritt-init
- docker push ${ECR_REGISTRY}/mrt-init
- docker build --quiet --build-arg ECR_REGISTRY=${ECR_REGISTRY} --no-cache --force-rm -t ${ECR_REGISTRY}/callback mrt-services/callback
- docker push ${ECR_REGISTRY}/callback
post_build:
commands:
#- aws s3 rm s3://${S3CFBUCKET}/api --recursive