Jenkins – Continuous Integration (Development, Build, Test & Release)

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.
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
  1. Dev machine from where code changes are pushed
  2. Git (repository) machine for code management
  3. Jenkin machine, continuous integration (CI) server
  4. QA/UAT machine



In nutshell, only four important commands require to complete entire process

  1. Git
    • Management tool where code resides
  2. MSbuild (Microsoft Build Engine)
    • build and create release package (.zip))
  3. Vstest.console
    • run unit testing of release assembly
  4. 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

  1.  Repository setup to pull code
    • We are going to use git as code repository to pull code changes
    • ref  Git Setting
  2.  Set Build Trigger
    • We could choose periodically execute automatically
    • ref Poll SCM
  3.  Microsoft Build
    • MSBuild to clean and build solution here compilation errors are catched
    • ref  Build Setting
  4.  Unit Test
  5.  Set solution to publish and release package in zip format
  6.  Set MSBuild to create deployable package
  7.  Set Artifacts
  8.  How to do manual deployment
  9.  How to do auto deployment

Quick recapd videos for jenkins Configuration, Build, Test, Manual and Auto Deploy