- Service Delivery Program
- About Us
TABLE OF CONTENT
|1. Overview of CodePipeline
|2. Top Features of CodePipeline
|3. What is Monorepo?
|4. Benefits of using Monorepo
|5. Solution Overview
|6. Sample Architecture Diagram
|7. Creating the Lambda Function
|8. Creating the GitHub Webhook
|10. About CloudThat
AWS Code Pipeline is an AWS service that helps to deploy the software automatically. It will allow the developer to deliver the code for new updates quickly. It is a continuous delivery service. CodePipeline will automatically build, test, and launch an application every time the code changes.
It will reduce the development time, which contains only a few manual steps. With CodePipeline, we can easily configure the software release at different stages.
Many organizations make use of GitHub as a source code repository. Multiple applications and services store the source code of numerous projects in a single repository, and it is called monorepo.
Monorepo is a centralized place where the codebase lives in the same repository. Everyone in the team uses the latest version of code for the projects. It is a single repository that stores the codes of multiple applications and libraries.
The release pipeline is invoked by default when there is a change in the code repository. While using GitHub as the pipeline source the pipeline, to detect the changes in the remote branch and start the pipeline, the CodePipeline will make use of a webhook. When we make changes in any of the folders in the repository of the monorepo with GitHub, the CodePipeline gets an event at the repository level.
The above diagram describes how GitHub events will invoke a monorepo service-specific pipeline by evaluating the event triggered using Lambda.
The above figure describes the following steps:
The above solution describes the following parts:
The CodePipeline will automatically trigger the pipeline to release the latest version of the source code. By choosing the release change we can manually run the latest version of the code.
The Lambda function is responsible for evaluating and authenticating the events. The function can be resolved through GitHub event payloads by determining which files are changed, deleted, added and appropriate actions are performed:
S3 stores the project configuration details, Lambda can read the configuration file and decides what actions to be taken when the particular file is matched from the GitHub event.
Webhooks allow external services to be notified of certain events provided by GitHub. Webhooks are used to create to push events. POST requests are generated to the URL specified for any files committed and pushed to the repository.
In the above example, the GitHub source code repository is monitored by two pipelines. Based on the GitHub events, the lambda function will decide which pipeline to run. The lambda function has the logic to ignore the unimportant file. Using S3, API Gateway, and Lambda combination servers as logic to invoke pipeline.
CloudThat is the official AWS (Amazon Web Services) Advanced Consulting Partner and Training partner and Microsoft gold partner, helping people develop knowledge of the cloud and help their businesses aim for higher goals using best in industry cloud computing practices and expertise. We are on a mission to build a robust cloud computing ecosystem by disseminating knowledge on technological intricacies within the cloud space. Our blogs, webinars, case studies, and white papers enable all the stakeholders in the cloud computing sphere.
Drop a query if you have any questions regarding Github Integration, AWS CodePipeline, and DevOps best practices and I will get back to you quickly. To get started, go through our Expert Advisory page and Managed Services Package that is CloudThat’s offerings.
Yes. Multiple projects can be put in a single repository, but they would have to be on different branches.
Monorepos can be used when the entire team can view the changes done to the code by a single person. Multi-Repos creates separate repos for every team.
Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!