Skip to content

Commit

Permalink
Spring Boot in AWS Elastic Beanstalk with AWS CloudFormation - Fixing…
Browse files Browse the repository at this point in the history
… buildspec.yml
  • Loading branch information
yohanbeschi committed Feb 18, 2021
1 parent e113679 commit 7884add
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions aws-eb-springboot/eb-springboot-app/buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ phases:
commands:
- echo "Starting building/deploying SpringBoot App in test - $(date)"

- aws configure set profile.spikeseed-labs-prod.region eu-west-1
- aws configure set profile.spikeseed-labs.credential_source EcsContainer
- aws configure set profile.spikeseed-labs.role_arn $ROLE_ARN
build:
commands:
- echo "Current folder $(pwd)"

- ls -la

# Build
- mvn package

# Push to S3
- UUID=$CODEBUILD_SOURCE_VERSION-$(date "+%Y%m%d%H%M%S")
- S3_KEY=backend/eb-springboot-$UUID.zip
- UUID=$CODEBUILD_RESOLVED_SOURCE_VERSION-$(date "+%Y%m%d%H%M%S")
- S3_KEY=backend/eb-springboot-$UUID.zip
- echo "s3://$ASSETS_BUCKET_NAME/$S3_KEY"
- aws s3 cp --quiet target/eb-springboot.zip s3://$ASSETS_BUCKET_NAME/$S3_KEY
- aws ssm put-parameter --name /eb-springboot/eb/backend/s3key --value $S3_KEY --type String --overwrite --profile spikeseed-labs
Expand Down

0 comments on commit 7884add

Please sign in to comment.