-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildspec.yml
23 lines (22 loc) · 946 Bytes
/
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
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 376663947856.dkr.ecr.us-east-1.amazonaws.com
build:
commands:
- echo Build started on $(date +%Y-%m-%d)
- echo Building the Docker image...
- docker build -t perpetual-shred .
- docker tag perpetual-shred:latest 376663947856.dkr.ecr.us-east-1.amazonaws.com/perpetual-shred:latest
post_build:
commands:
- echo Build completed on $(date +%Y-%m-%d)
- echo Pushing the Docker image...
- docker push 376663947856.dkr.ecr.us-east-1.amazonaws.com/perpetual-shred:latest
- printf '[{"name":"perpetual-shred","imageUri":"376663947856.dkr.ecr.us-east-1.amazonaws.com/perpetual-shred:latest"}]' > imagedefinitions.json
artifacts:
files:
- imagedefinitions.json
name: perpetual-shred-build-artifact