Recently, I worked on creating a CI/CD for a JHipster application. For all the folks out there who are new to JHipster, it's a development tool to generate a Spring Boot + React/Angular/Vue web application (https://www.jhipster.tech/). The tool also auto-generates a bunch of configuration for different DBs along with CI/CD scripts and Sonar configuration for static analysis.
Now, if your company has all its infra on AWS, you would like to have the CI/CD also part of the AWS infra for obvious reasons like security! duh!.
In AWS, we have AWS CodePipeline, which may not be as extensible like Jenkins but solves our need as it integrates well with AWS Services.
Our application needed to have Dev, QA and Prod environment in the same pipeline with multiple stages and approvals which I will go over in a minute or so. Now, I will go through each stage to provide more info.
Source
The first stage that pulls code from the GitHub repo. You must select the webhook when creating this stage to have the pipeline triggered from GitHub with every merges.
Build
For building the codebase, I used AWS CodeBuild. The artifact of this stage was the war file from the JHipster application. The war needed to be deployed to an Elastic Beanstalk with tomcat configuration.
The Tomcat configuration for the beanstalk is a bit tricky. One need to ZIP the war and the configuration files for successful deployment.
Deploy
Once the war is zipped in the build stage, it sits in S3 with Server Side Encryption enabled. This ZIP is then pushed to Elastic Beanstalk for deployment.
Integration Testing
This stage runs a bunch of Selenium tests configured for the complete Web application.
QA
Here we have a manual approval step which emails the folks for approval. Once approved, it will deploy to the QA environment.
One can replicate the same QA stage multiple times for Staging or Production environments as well.
Top comments (1)
Hi Pravat, would like to see project and step by step guide to install on local system