Interested in Solving your Challenges with XenonStack Team

Get Started

Get Started with your requirements and primary focus, that will help us to make your solution

Proceed Next

DevOps

Build and Deploy Continuous Delivery Pipeline with Jenkins

Navdeep Singh Gill | 28 August 2024

Continuous Delivery Pipeline with Jenkins

Getting Started with Jenkins

Jenkins is an Open Source Automation server, Jenkins helps to automate the software development process, with Continuous Integration and by facilitating technical aspects of continuous delivery.It works on a distributed network which helps build tests and deploy faster.

Introduction to Continuous Delivery

Continuous delivery is a branch of continuous integration. It concentrates on automating the software delivery process so that teams can quickly and confidently deploy their code to production at any point.

Introduction to Continuous Integration

Here Jenkins shall be used in order to create a continuous integration pipeline for NodeJs applications. Jenkins contains a number of plugins, so in order to make Jenkins compatible with other tools such as gitlab, docker or kubernetes we shall need to install the required plugins. You can also learn more about Bazel tool in this blog. Jenkins being a java application can be installed both as a standalone application and on tomcat servlet. Here we shall install and run Jenkins on a docker container. By default, Jenkins runs on 8080 port. Jenkins can be installed docker using this command:- docker run -it -p 8080:8080 jenkins:alpine

Setting up Continuous Delivery with Jenkins

In order for Jenkins to work with gitlab, install some plugins. Go to the Jenkins dashboard > Manage Jenkins > Manage Plugins. Jenkins CI-CD Step 1 - Setting up Continuous Delivery with Jenkins Search for gitlab plugins and install them. Then in gitlab generate an API token for gitlab to talk with Jenkins. Now go copy the token generated and go to Jenkins dashboard > credentials > system > global credentials and add the credentials there. Jenkins CI-CD Step 2 - Adding the credentials Now create a job >freestyle project. Then describe your project, configure your gitlab repo in the source code management section, build the triggers and define the post-build methods if any. Jenkins CI-CD Step 3 - Configure your Gitlab repo For your project to build you can shell actions or configure some ansible playbooks or a bash script for deployment. Jenkins also supports Docker, Ansible, and kubernetes plugins. We can configure Jenkins to create an image and deploy it on kubernetes. For post-build actions configure build status to gitlab commit. Jenkins CI-CD Step 4 - Post build Actions configure Now need to configure GitLab to trigger the builds. We&rsquo'll do this with webhooks, and shall need one per Jenkins job. Jenkins CI-CD Step 5 - Configure GitLab to trigger the builds

A Holistic Strategy

Building and deploying continuous delivery on Jenkins involves no. of steps to perform while getting this done. To perform this task in a compressive way, you are advised to take below steps:

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now