-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
20 lines (20 loc) · 882 Bytes
/
buildspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin `aws sts get-caller-identity --query Account --output text`.dkr.ecr.$AWS_REGION.amazonaws.com
build:
commands:
- echo Build started on `date`
- echo Building the Docker image...
- docker build -t batch-jobs/test-job .
- docker tag batch-jobs/test-job:latest `aws sts get-caller-identity --query Account --output text`.dkr.ecr.$AWS_REGION.amazonaws.com/batch-jobs/test-job:latest
post_build:
commands:
- echo Build completed on `date`
- echo Pushing the Docker image...
- docker push `aws sts get-caller-identity --query Account --output text`.dkr.ecr.$AWS_REGION.amazonaws.com/batch-jobs/test-job:latest
artifacts:
files:
- '**/*'