forked from felipemeriga/DevOps-Example
-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathbuildspec.yml
More file actions
23 lines (22 loc) · 737 Bytes
/
buildspec.yml
File metadata and controls
23 lines (22 loc) · 737 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
version: 0.2
phases:
install:
runtime-versions:
docker: 18
pre_build:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region sa-east-1)
build:
commands:
- echo building maven project
- echo Build started on `date`
- mvn clean install
- echo Building the Docker image...
- docker build -t devops-service:latest .
- docker tag devops-service:latest 824065353601.dkr.ecr.sa-east-1.amazonaws.com/devops-service:latest
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image...
- docker push 824065353601.dkr.ecr.sa-east-1.amazonaws.com/devops-service:latest