Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Springboot AWS CodeDeploy

jrodriguez93 September 16, 2019

At this moment I have a Springboot Application (Maven), I want to implement CI/CD with Bitbucket Pipelines and AWS CodeDeploy, but I don't really understand how I can do it, I already see the maven build template, however , I don't know how can implement the AWS code deploy part... (How I can send the generated .jar to S3) ?.

2 answers

0 votes
Richard Gathogo October 1, 2019

Hi @jrodriguez93 ,

For spring boot you can create the jar file zip it together with appspec.yml and scripts on bitbucket pipelines. I have worked on something close to that and that is how I approached and it works well.

Find attached some sample files for deploying to the EC2 server using bitbucket pipelines. This assumes that you have already configured AWS codedeploy to deploy to EC2 server. Please check them out Sample config files

Remember to add after_install.sh,  application_start.sh, before_install.sh to execute actions before and after deployment.

I hope they can help. Let me know in case you have any questions.

olumayokun June 12, 2020

Hello Richard,

I followed your sample config to deploy a maven based spring boot application to an EC2 instance successfully. However I am a little unsure of what to put in the BeforeInstall, AfterInstall, and ApplicationStart sections of the AppSpec file. I will like to execute the jar as a Linux service, start, and stop the service. Kindly help with sample config for this.

Thanks

0 votes
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2019

Hello @jrodriguez93,

Bitbucket Pipelines have a concept of Pipes – simple way to configure a pipeline, and Deployments. There's a ready to use pipe for AWS CodeDeploy.

There's also a great tutorial of setting up a pipeline that uses AWS CodeDeploy.

I hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events