Skip to content

Adding to aws #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test1
  • Loading branch information
apoorva0803 committed Feb 13, 2025
commit 95bb4714f3145d9390211031acc5bb44bf549462
20 changes: 20 additions & 0 deletions buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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 657880976613.dkr.ecr.us-east-1.amazonaws.com/docker-hello-world-spring-boot
- IMAGE_URI=657880976613.dkr.ecr.us-east-1.amazonaws.com/docker-hello-world-spring-boot:latest
build:
commands:
- echo Building Docker image...
- docker build -t $IMAGE_URI .
- docker tag $IMAGE_URI $IMAGE_URI
post_build:
commands:
- echo Pushing Docker image to ECR...
- docker push $IMAGE_URI
- echo Writing image details to imagedefinitions.json...
- printf '[{"name":"springboot-container","imageUri":"%s"}]' $IMAGE_URI > imagedefinitions.json
artifacts:
files: imagedefinitions.json