CI/CD pipelines in DevOps Basics
Those are the continuous integration and continuous deployment.
Where release of the application will be fully automated.
Build pipeline
- Parties Involved
- Developer - provide there code
- DBA - provide necessary DB Script
- IT Pro / DevOps
- The will care about the infrastructure that we run,
- They will make sure that the app will fit inside our infrastructure
- Version Control (SCM)
- Github, Bitbucket etc
- Developer Push Code to this SCM system
- DBA Push DB scripts to this SCM system
- IT Pro / DevOps
- Use some tool like Terraform OR ARM Templates to provision resources on Azure.
- Each cloud provider has its own technology in order to provision and maintain the infrastructure. They have their source code files. if Environment/Cloud allowed, put there source code files to SCM system
- Github, Bitbucket etc
- Build the code (compile it)
- Test
- Run Some Unit Tests against code
- Static Code Analysis using Sonar cube
- Test DB Script
- Run validation of DevOpt Infra files against Terraform Plan
- Run Some Unit Tests against code
- Finally Build Out as a Package (A Dll, An Exe or RAR etc)
- Test
Release pipeline
- Release the final application
- Run UAT, QA)
- Integration Test
- TSQT - unit test stored procedure and functions
- Validate DB Schema in script
- UI Test of code
- Deploy at Dev Environment
- Deploy Code
- Deploy DB Scripts
- Deploy Infra config files
- Add Monitor tool here - that check further changes in SCM
- Jenkins
- Azure Devops
- GIT Lab CI
- Circle CI
- Go CD
- These Tools to be used to implement this CI/CD pipelines in order to create a process where the application source could go through this process before going to their production environment so that we make sure that everything is automated.
- Once Approved on dev - Deployment on Production
- Deploy the Final Application to Production Server (Web App)
- Deploy the Final DB Scripts to Production Server (Database App)
DevOps
Making the developers and my IT Personal and my DBA, all of them, they should work together.
Deploy pipeline also called CI pipeline or for continuous integration. And each time I have a new change, I want to trigger the build pipeline.
And if there is a new build or a new CI pipeline that runs, Run the release pipeline just after that, called CD pipeline
You have a master branch and also then you have a Dev branch. For each new development, we have to create a story/feature branch out our Dev/Master branch
- once that story we finished, we push the same to respective story/feature branch
- Take a pull from Dev/Master branch and merge our story / feature branch in it. and finally push our PR (pull request) to DEV branch
- Just at this time will go to trigger the build pipeline and we can configure our CI/CD pipeline in order to take into account the pull requests and Build and deploy are changes.