Posts

Showing posts with the label setup

Guide to Setting Up CI/CD for NextJS with Jenkins, Gitlab, and AWS ECS

Image
Introduction In the previous article, I provided instructions on setting up CI/CD with Jenkins and Gitlab to deploy a NestJS project to AWS EKS. Now, I will provide similar guidance for deploying a project using the NextJS framework to AWS ECS, triggering an auto build on Jenkins when pushing code to Gitlab, and running tests for the project before deployment. A summary of the steps involved will be as follows: Build the Docker image for the NextJS project and push it to AWS ECR. Deploy that Docker image to AWS ECS. Set up Jenkins to connect with Gitlab. When code is pushed to Gitlab, Jenkins will trigger an auto build of the steps defined in the Jenkinsfile, including: Pulling the new code from Gitlab. Running tests for the project. If the test fails, stop the deployment process. If the test passes, proceed to the next step. Building the Docker image with the new code and pushing it to AWS ECR. Deploying to AWS ECS by restarting the service, which will use the latest Docker image to d...