File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 1
1
version : 0.2
2
2
3
+ env :
4
+ variables :
5
+ AWSCOPY : " aws s3 cp s3://docker-ecs-simple/simplewebappdev.war simplewebapp.war"
6
+
3
7
phases :
4
8
pre_build :
5
9
commands :
6
10
- echo Logging in to Amazon ECR...
7
11
- eval $(aws ecr get-login)
8
12
build :
9
13
commands :
10
- - aws s3 cp s3://docker-ecs-simple/simplewebapptest.war simplewebapp.war
14
+ - eval $(AWSCOPY)
11
15
post_build :
12
16
commands :
13
17
- echo Build started on `date`
Original file line number Diff line number Diff line change
1
+ version : 0.2
2
+
3
+ phases :
4
+ pre_build :
5
+ commands :
6
+ - echo Logging in to Amazon ECR...
7
+ - eval $(aws ecr get-login)
8
+ build :
9
+ commands :
10
+ - aws s3 cp s3://docker-ecs-simple/simplewebapptest.war simplewebapp.war
11
+ post_build :
12
+ commands :
13
+ - echo Build started on `date`
14
+ - echo Building the Docker image...
15
+ - docker build -t simplewebapp --build-arg WEBCONTEXT=$WEBCONTEXT .
16
+ - docker tag simplewebapp:latest $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$AWS_REPO_NAME:latest
17
+ - echo Build completed on `date`
18
+ - echo Pushing the Docker image...
19
+ - docker push $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$AWS_REPO_NAME:latest
You can’t perform that action at this time.
0 commit comments