Jenkins is a opensource tool used for automating the application deployment and delivery . Jenkins can be used for building , packaging , testing and deploying the application . Which is more often called as a ci/cd pipeline .
ci/cd pipeline is a part of Devops lifecycle it comes under deployment phase . Where we have to pass our application through version control , building , testing and then deploy our application to the testing environment first secondly to the production environment this phase is completely automated by using a continuous integration and continuous deployment pipeline so that we make sure our application delivery time is reduced .
Here we are doing it on ubuntu machine you can do it on any operating system your choice .
$wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -
$sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > \
$sudo apt-get update
$sudo apt-get install jenkins
by default Jenkins is running on port 8080 so we have to enable Jenkins on the system startup .
$sudo systemctl status jenkins
$sudo systemctl enable jenkins
If you have firewall enabled make sure it accepts all the incoming request through port 8080 .
$sudo ufw status
$sudo ufw allow 8080
Then open go to port 8080 on your local machine
if you are running it on a remote machine then simply replace the host ip or domain instead of localhost .
- set up the default password by navigating to the directory .
- install suggested plugins .
- Create a webhook with GitHub so when we push the code to GitHub it can automatically do the desired step(Building, packaging, testing .)
- Go to your GitHub repository .
- Then settings .
- Then Webhook .
- Then Type the URL of your server with
2.Then in Jenkins you have to create a new job .
- Add git as a version code and repository URL .
- Then under the build triggers select