- 5 mins

Building a CI/CD Pipeline with Jenkins and GitHub

Table of Contents

1. Introduction to CICD

1.1 What's CICD

1.1 How deployment looked in the old world without CICD

CICD’s benefits always be mentioned:

But no one tell the details of why it is faster and lesser risk. The development process when I was an intern(Before having CICD) was like developers have to deploy the environment with the help of the operations team because have no permission to access production servers.

The delivery of the program to the operations team was done manually, including the packaging such using “tar czvf app.tar.gz “and tools such as “scp” to transfer the compressed file.

Once the operations team received the program package, they had to deploy based on manual processes or bash shell scripts, and they could not even be sure if the application had been tested enough…

If a bug occurs in the production environment, the time spent on the above complex steps is wasted. then rolled back manually and the above steps must be repeated, causing further delays and wasting more time. This what the error-prone and time-consuming of manual process refer

The inefficiencies of manual deployment processes is important to know for people especially who are new to the industry

☞ Demo of the deployment process using Bash Shell in ancient time

1.2 Necessary Plugins for Jenkins

If you want to set up a CI/CD pipeline using Jenkins, you will need to install some plugins to support the various stages of the pipeline. Here are some plugins that are commonly used in CI/CD pipelines:

1.3 CI/CD Workflow Overview

pass

2. Tools and Technologies

There are several common ways to implement CICD, but one of the most popular methods is to use a combination of a version control system (such as Git), a continuous integration server (such as Jenkins), and a deployment tool (such as Ansible or Docker). So we just chose these as the tools to implement the CICD today :)

3. Setting Up CI/CD with Jenkins and GitHub

3.1 Setting Up a Jenkins Project

  1. Setting up the credentials
    • Generate a Secret string, there a few metod to generate it, i chose uuid
Alt Text
Setting up pipeline

Dashboard > Manage Jenkins > Credentials > System > Global credentials (unrestricted)

  1. Setting up pipeline
Alt Text
Setting up pipeline

1. xx 2. xx 3. xx

3.2 Setting Up Github

<div class="side-by-side clearfix">
    <img class="left-image" src="assets/images/posts/build-a-blog/contents/cicd_github_img0.png" alt="Alt Text">
    <figcaption class="caption">GitHub Webhooks Setting</figcaption>
    <p class="right-text">
        <span> Select your project => Settings => Webhooks </span>

     </p>
</div>

3.3 Connecting Jenkins to GitHub

pass

===

Topaz

Topaz

Always keep learning.

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google pinterest medium vimeo