This Video Tutorial Explains what is Continuous Integration, Set Up for Jenkins Continuous Integration, Explored Jenkins CI Features, Dashboard, etc.:
In this tutorial, we will learn about Continuous Integration and Jenkins CI in brief.
Here we will also cover Agile Development methodology, setup and deployment of Jenkins Continuous Integration, Jenkins features, Running Jenkins, etc.
What You Will Learn:
Video Tutorial Jenkins CI
Here is a Video Tutorial:
In today’s fast-growing era, it is required for every software to meet the demands of the customers from time to time. This leads to the emergence of a new technology called agile development.
In agile development, the development and testing phases take place parallelly, unlike the waterfall model. Also, the entire software is broken into smaller modules and each module is delivered on a sprint basis. Each sprint will have 30 days. This is called agile scrum development. There is also a manifesto written for this kind of development.
Key parts of the manifesto include:
- Working with clients directly and also the clients are aware of what is happening.
- The huge modules are broken into smaller modules.
- There are daily calls authored by sprint master.
- Open to new challenges at the end of the sprints.
Types of Agile Development are:
- Extreme programming
- Lean programming
- Test-driven programming
Agile Development flow chart:
The above figure demonstrates the agile development where the development happens module wise or functionality wise. So, here when the functionality development is completed it is integrated and tested at the same time.
Finally, when n functionalities are done then there is a demo release followed by client feedback. After the feedback is received, the changes are made accordingly and complete system testing is done. Finally, it is released to the market, and then the next iteration is started.
What Is Continuous Integration?
Continuous Integration or CI is a type of development where developers check in their code regularly. Here, we can detect errors quickly as the result of the build is quickly monitored. We make use of version control tools integrated with Jenkins.
This kind of development brings several benefits to the organization. Few of them are listed below:
- The product will have a strong base as the integrations are frequent and testing is also done early.
- Long integrations are eliminated.
- The software is delivered more rapidly.
Typical Setup For Continuous Integration
This is a higher level of the setup of continuous integration.
Setup of continuous integration:
The above-mentioned setup can be explained as follows:
- Step 1: There is a new code written by the developer or Automator. Hence a new code notification comes to the continuous integration server like Jenkins. The notification can be done via hooks or the CI server can poll.
- Step 2: The CI server pulls the new code from the source control tool like svn or perforce.
- Step 3: The CI server initiates the start of the build tests. Based on the pass percentile the deployment starts.
- Step 4: The deployment process is started by the CI server. And the new code is deployed in the server shown by Step 5.
- Step 6: Finally the deployment services are ended by the CI server.
What Is Jenkins Continuous Integration?
One of the famous continuous integration servers is Jenkins. It is an open-source tool that aids in the continuous integration process.
This server helps in the following tasks:
- Run the automated test scripts.
- Run the shell scripts.
- Send email notifications to the developers.
Jenkins can be installed using docker container and docker images. The images are available for many platforms like Windows, Linux, and Mac. Also, there is a generic java package (.war) file through which installation can also be done.
- Pipeline feature
- Open-source tool
- Hosted locally
- A lot of plugins that can be integrated.
- Email notification possible.
- Easy to install.
- Blue ocean features available as well.
Follow the below steps to run Jenkins:
- Download the Jenkins -Generic Java package
- Go to the file location of the war file in the command window.
- Run the command: Java –jar jenkins.war
Running the Jenkins war
As you can see in the above image that the initial setups are being run in the command line.
Please see in the below picture, the setup will generate a random password for you to use on the initial login. Note this one down.
Administrator password screen:
Select the plugins which need to be installed:
Admin user and password creation screen:
Jenkins Dashboard screen:
The above images demonstrate the following process:
You will have to wait till the following command appears on the screen “Jenkins is fully up and running”.
Once this appears, Open the browser and type http://localhost:8080. Jenkins runs on port 8080 by default. Type the password which was noted earlier and install the desired plugins shown.
Create your admin user and password and then the home screen will appear after this step.
In this tutorial we have learned about the following:
- Agile development, its features, and different types of agile development like extreme programming, scrum development, etc.
- Continuous integration, its benefits in today’s world.
- Setup of continuous integration which consists of source control, continuous integration server, and a server. We also saw that hooks or time-based polling are used to trigger the continuous integration server.
- Jenkins Continuous Integration server and various functions produced by Jenkins.
- Jenkins features like an open-source, rich set of plugins, easy setup, can also be deployed on other java servlets like tomcat.
- Running Jenkins