- Newest
- Most votes
- Most comments
To automate deployment of spring boot application, you will be needing three stages in codepipeline.
- Source (Github: Version 2 recommended)
- Build ( Include the commands in buildspec.yml to build)
- Deploy ( AWS Elastic Beanstalk as action).
When we create codepipeline, there is an option to select the Artifact Store bucket and KMS key for encryption.By default, codepipeline uses the bucket codepipeline-Aws_Region-Account_ID and default kms key. All the permissions are added by default to the both the service roles that are created by default. Please, make sure that both the codepipeline and codebuild service role should have permission to the s3 and kms for custom configurations. S3 bucket should have permission to allow codepipeline and codebuild service role to read and write to S3. If using custom KMS, key resource policy should also allow the access to CodeBuild and CodePipeline service role. Please refer the documentation [1] that uses CodePipeline to run CodeBuild and deploy to Elastic Beanstalk.
In the codebuild buildspec.yml you need to create the artifacts that will be used by the next stage Deploy with action AWS Elastic Beanstalk. You can refer [2] for the the buildspec.yml syntax. artifacts: files: - "**/*"
References:
[1] https://docs.aws.amazon.com/codebuild/latest/userguide/sample-elastic-beanstalk.html#sample-elastic-beanstalk-codepipeline [2] https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-syntax
Relevant content
- AWS OFFICIALUpdated 20 days ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 3 months ago