Skip to content

Jenkins

Jenkins is a continuous integration tool. It can fetch the code from the version control system, build the code, test it and notify the developer. Jenkins can do continuous delivery also. Jenkins has so many plugins, by using these plugins we can do any task in Jenkins. Jenkins is an open sources project. It is a java based web application server so we need to set up first java on the machine to run the jenkins server.

Jenkins CI CD Automation

image

Jenkins Setup

 #!/bin/bash
echo "Installing Java 17"
sudo apt update
sudo apt install fontconfig openjdk-17-jre -y
java -version

echo "Installing Jenkins"
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins -y
#!/bin/bash
sudo wget -O /etc/yum.repos.d/jenkins.repo \
    https://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum upgrade -y
# Add required dependencies for the jenkins package
sudo yum install fontconfig java-11-openjdk -y
sudo yum install jenkins -y

CICD Setup

You can find my Jenkins CICD pipeline jobs which are saved in an HTML format, please download and extract to see the jobs

To View My Jenkins CICD Jobs Click here