Skip to content

Commit b520f26

Browse files
committed
test image push with the new aws ECR
1 parent 91cce28 commit b520f26

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# AwsCodeBuild-AwsCodePipeline-sample
22

33

4-
To build the nodeJs application follow the link: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
4+
To build the nodeJs application follow the link: https://nodejs.org/en/docs/guides/nodejs-docker-webapp/
5+
6+
create Codebuild https://docs.aws.amazon.com/codebuild/latest/userguide/create-project.html#create-project-console
7+
8+
create ECR
9+

buildspec.yml

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
version: 0.2
22

33
phases:
4+
pre_build:
5+
commands:
6+
- echo Logging in to Amazon ECR...
7+
- $(aws ecr get-login --no-include-email --region us-east-1)
48
build:
59
commands:
6-
- docker build -t nodejs-awscodebuild-sample .
10+
- echo Build started on `date`
11+
- echo Building the Docker image...
12+
- docker build -t nodejs-awscodebuild-sample .
13+
- docker tag nodejs-sample:latest 458897973412.dkr.ecr.us-east-1.amazonaws.com/nodejs-sample:latest
14+
post_build:
15+
commands:
16+
- echo Build completed on `date`
17+
- echo Pushing the Docker image...
18+
- docker push 458897973412.dkr.ecr.us-east-1.amazonaws.com/nodejs-sample:latest

0 commit comments

Comments
 (0)