Jenkins is mainly used for Continues Integration (CI) and Continuous Deployment (CD). It is a java-based tool that can be installed from ubuntu. It is an open-source automation server. By using Jenkins, you can automate tasks like build the code whenever a developer pushes the changes into the repository.
What are the required things?
Stages for the Installation process:
sudo apt-get update
sudo apt install openjdk-8-jdk
java -version
The output should be shown below.
Now, java is working fine.
sudo wget -q -o -https://pkg.jenkins.io/Debian/Jenkins.io.key | sudo apt-key add -
sudo sh -c ‘echo deb http://pkg.jenkins.io/debian-stable-binary/> /etc/apt/sources.list.f/Jenkins.list’
sudo apt-get update
sudo apt-get install jenkins
Check the status Jenkins by using the below command
sudo systemctl status jenkins.
The output of Jenkins is shown like this.
sudo ufw allow 8080
Now check the rules of the ufw firewall by using…
If the firewall is inactive, use the following commands to enable it.
# sudo ufw allow OpenSSH
# sudo ufw enable
Restart the Jenkins
# systemctl restart jenkins
Get the initial admin password by using the below command:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
Enter the password and continue:
Then you can choose Install suggested plugins or select plugins to install any one of them.
Once click on "Install suggested plugins" to start your installation.
When the installation is done with some of the suggested plugins the next screen should be like this.
Now, you can create an Admin User and password or choose to skip and continue as admin.
The next page should be asking Instance Configuration Jenkins URL. You can confirm with the server IP address with the default port number.
Click on Save and Finish.
Now choose to start using Jenkins.
Finally, your Jenkins dashboard will be like this as shown in the image