File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -9,21 +9,17 @@ phases:
99
1010 pre_build :
1111 commands :
12- - echo "Entering the project directory"
13- - cd server # Change to the correct directory where your pom.xml is located
1412 - echo "Nothing to do in the pre_build phase..."
1513
1614 build :
1715 commands :
1816 - echo "Build started"
1917 - mvn clean package
20- - pwd # Print the working directory
21- - ls -la # List all files in the current directory
2218
2319 post_build :
2420 commands :
2521 - echo "Build completed"
2622 - aws ssm get-parameter --name maddy-test --with-decryption --query "Parameter.Value" --output text > private_key.pem
2723 - chmod 600 private_key.pem
28- - ls -la target
29- - scp -o StrictHostKeyChecking=no -i private_key.pem target/ webapp.war ubuntu@44.204.28.186:/home/ubuntu/webapp.war
24+ - find /codebuild/output/ -name webapp.war -type f -exec ls -la {} \; # Locate and list webapp.war files
25+ - scp -o StrictHostKeyChecking=no -i private_key.pem $(find /codebuild/output/ -name webapp.war -type f) ubuntu@44.204.28.186:/home/ubuntu/webapp.war
You can’t perform that action at this time.
0 commit comments