Continuous Integration (CI)
Continuous Integration is a software development practice where team members integrate their work frequently, usually each individual integrates at least daily that leads to multiple integration everyday. Each integration is verified by an automated build that includes unit testing to find integration errors as fast as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
Continuous Integration is a software development practice where team members integrate their work frequently, usually each individual integrates at least daily that leads to multiple integration everyday. Each integration is verified by an automated build that includes unit testing to find integration errors as fast as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.
This article is about quick practical of Continuous Integration summarizing the technique and its current usage.
Continuous Integration is backed by several important principles and practices.
- Maintain a single source repository
- Automate the build
- Make your build self-testing
- Every commit should build on an integration machine
- Keep the build fast
- Test in a clone of the production environment
- Make it easy for anyone to get the latest executable
- Everyone can see what’s happening
- Automate deployment
Continuous Deployment (CD)
Continuous deployment is very closely related to continuous integration and refers to the release into staging of software that passes the automated tests.
By adopting both Continuous Integration and Continuous Deployment, one not only reduce risks and catch bugs quickly, but also move rapidly to working software.With low-risk releases, you can quickly adapt to business requirements and user needs. This allows for greater collaboration between ops and delivery, fueling real change in your organisation, and turning your release process into a business advantage.
To create practical scenario of continuous integration we are going four instance or virtual machines as follows, diagram quick understanding
- Dev machine from where code changes are pushed
- Git (repository) machine for code management
- Jenkin machine, continuous integration (CI) server
- QA/UAT machine
- must have win server machine (2008 or 2012)
- running Web Deployment Agent Service (ref Windows Deployment Services)
- running Web Management Service (ref Windows Deployment Services)
In nutshell, only four important commands require to complete entire process
- Git
- Management tool where code resides
- MSbuild (Microsoft Build Engine)
- build and create release package (.zip))
- Vstest.console
- run unit testing of release assembly
- MSdeploy (Microsoft Deploy Engine)
- deploy package and sql on QA machine
Jenkins configuration is so vital for successful completion of CI & CD automation, nothin to worry, it is not so complax if one knows process flow and associated commands, so let us go through it step by step
- Repository setup to pull code
- We are going to use git as code repository to pull code changes
- ref Git Setting
- Set Build Trigger
- We could choose periodically execute automatically
- ref Poll SCM
- Microsoft Build
- MSBuild to clean and build solution here compilation errors are catched
- ref Build Setting
- Unit Test
- VSTest for unit testing
- ref Unit Testing
- It creates TestResults after unit testing
- remove test result (ref: Remove Unit Testing Result)
- Set solution to publish and release package in zip format
- Set MSBuild to create deployable package
- ref Deploy Package
- Set Artifacts
- ref Artifacts
- How to do manual deployment
- QA import release or deploy-able package
- ref video Jenkins – ASP.NET MVC Build, Test & Manual Deploy
- How to do auto deployment
- MSDeploy command setup in Jenkins
- Create Empty Site in IIS
- ref video Jenkins – ASP.NET MVC Build, Test & Auto Deploy
Quick recapd videos for jenkins Configuration, Build, Test, Manual and Auto Deploy
- Quick video Jenkins – Configure Continuous Integration ASP.NET MVC
- Quick video Jenkins – ASP.NET MVC Build, Test & Manual Deploy
- Quick video Jenkins – ASP.NET MVC Build, Test & Auto Deploy
Advertisements
Pingback: Jenkins – ASP.NET MVC Build, Test & Manual Deploy | Coding Tutes
Pingback: Jenkins – ASP.NET MVC Build, Test & Auto Deploy | Coding Tutes
Pingback: Jenkins – Configure Continuous Integration ASP.NET MVC | Coding Tutes