Jenkins is the way to automate almost anything in an enterprise

CI/CD Ninjaneers

Submitted By Jenkins User Jatin Bedi
Automate everything from product builds to deployment by relying on the many plugins available with Jenkins.
Team Members: Monish Ratanji, Software Engineer, Bassam Zakariya, Project Manager, Mansi Malhotra, Software Engineer
Industries: Information Technology
Programming Languages: Java, Python, .NET, Golang, Docker
Platform: : Docker or Kubernetes, Linux, Windows
Version Control System: GitLab
Build Tools: Maven, MSBuild, Docker, Python
Community Support: Jenkins Users Google Group or IRC Chat, websites & blogs, Spoke with colleagues and peers

Zero downtime and rolling updates bring confidence to CI/CD in the property & casualty claim space.

Background: This project was for a leading provider of technology, connectivity, and information solutions to the property & casualty claims and collision repair industries. For them, the team needed to automate a wide variety of tasks like CI/CD, improve on deployment times, give people the ability to create infrastructure on multiple clouds using pipelines, create base images for Docker containers, and run the quality analysis using multiple tools like Sonar, Nexus IQ. But there wasn't a big budget or large team to get all this done.

Goals: The main goal was to automate everything from product builds to deployments. This included automating the creation and destruction of infrastructure using Terraform, Packer, and Ansible, and using a hybrid cloud model to automate microservice Docker deployments with zero downtime to production.

Solution & Results:

Jenkins allows our teams to build applications across platforms continuously. The Azure pipeline includes the ability to create any application on any platform, including Windows, Linux, and Mac. However, it also integrates well with Jenkins for teams who already use or prefer to use Jenkins for CI.

Because of Jenkins, I did not have to set up different platforms for the wide variety of tasks our team was aiming for. It is an all-in-one solution that takes care of automating everything and has a rich list of plugins available to help you with almost anything you may need.
profile picture
Jatin Bedi, CI/CD Consultant

As our release pipeline is very much integrated, we chose to use docker images once we complete the CI build we store in our private repository, Artifactory. We then push the image to trigger the development instance. Once the development instance is verified, we can trigger the UAT instance for testing. Once UAT is signed off, we release the same in production. In this way, we ensure that the same image is verified with different configs, i.e., test, UAT, and prod config. If the production fails, we can quickly rollback by releasing the last successful production. Since it only takes five to ten minutes, we can ensure that there is hardly any downtime if production fails due to some reason.

This is what we used to integrate Jenkins with Azure pipelines:

  • One way is to run CI jobs in Jenkins separately. This involves configuring a CI pipeline in Jenkins and a webhook in Azure DevOps that invokes the CI process when source code is pushed to a repository or branch.

  • Create an Azure DevOps Build Pipeline for Jenkins.

  • Create a Personal Access Token for connecting Jenkins and Azure DevOps. Then set up a Jenkins Build Project. Test the Jenkins Build. Set up an Azure DevOps pipeline release. Trigger the release with a Post Build Action in Jenkins.

  • We have used the following plugins.

    • Azure AD plugin allows the Jenkins server to support SSO for users based on Azure AD.
    • Azure VM Agents plugin uses an Azure Resource Manager template to create Jenkins agents in Azure virtual machines.
    • Azure Storage plugin uploads build artifacts to -- or downloads build dependencies from -- Azure Blob storage.
    • Azure Container Agents helps you to run a container as an agent in Jenkins.
    • Kubernetes Continuous Deploy deploys resource configurations to a Kubernetes cluster.
    • Azure Container Service deploys configurations to Azure Container Service with Kubernetes, DC/OS with Marathon, or Docker Swarm. Azure Functions deploys your project to Azure Function.
    • Azure App Service deploys to Azure App Service.

I am happy that I have used Azure DevOps with Jenkins and, in doing so, learned many new concepts. I am even more satisfied with the results:

  • Release time is very fast
  • Rollback time is quick
  • Downtime is negligible
  • Failback or failover chances are slim