This part of the Jenkins tutorial includes the Jenkins Cheat Sheet. In this part, you will learn various aspects of Jenkins that are possibly asked in interviews. Also, you will have a chance to understand the most important Jenkins Terminologies.
Jenkins is a software which allows you to do the continuous integration on your application/software lifecycle. It gets installed on the server where the central build will take place. Now let’s understand its workflow.
Learn DevOps in 16 hrs from experts
To manage Jenkins, click on the “manage tab” from the left-hand side.
Can be used to manage paths to various tools to use in builds.
Jenkins dynamically adds the config fields after the plugins are installed.
Plugins can be removed, updated and installed through manage plugin screen.
List all the current java properties and system environment variables.
System log- view Jenkins log in real time.
Script console- lets you run groovy scripts on the server.
Manage nodes- configure the number of builds you want.
Shutdown- click prepare to shutdown link to prevent any new builds from being started. After all current builds are finished, Jenkins will shut down cleanly.
Provides a host of plugins for unit testing of other technologies such as MS Test for .net unit testing.
Testing unit in Jenkins
Step 1: Open the dashboard, choose an existing project and click configure.
Step 2: Browse towards add a build step and invoke Ant.
Step 3: Click on advanced.
Step 4: Enter the location of build.xml in the build file section.
Step 5: Click the Add post-build option and click on Publish Junit test result report.
Step 6: Ensure the report is in the folder of the project workspace. The “*.xml” basically tells Jenkins to pick up the result xml files which are produced by running of the Junit test cases. Click Save after done.
Step 7: Click on build and check logs to see if it is successful or not.
It helps automate a part of the development process for continuous integration and with focus on continuous delivery.
Without automated testing you would have to carry forth some artifacts which are not viable. Hence use of software like selenium help run automated tests.
Let’s check an example for it:
Step 1: go to plugins and choose selenium plugins and click to install.
Step 2: go to configure system and select on selenium jar and save
Step 3: Go to dashboard and select the config option for the project at hand
Step 4: Click on add build step and choose Selenium HQ html Suite Run
Step 5: Add the required details and click on save, execute and build.
The test is executed, and a report is built.
Jenkins comes with a feature to add email notifications to the build project
Go-to Manage Jenkins → Configure System. In the email notification space enter the require STMP server and use email suffixes.
Configure the recipients so that they would receive notification about broken or unstable builds
Notification plugins such as Tikal Knowledge allows job status notification for JSON and XML formats.
We have covered all the basics of Jenkins in this cheat sheet. If you want to start learning DevOps in depth then check out the Jenkins Training by Intellipaat.
You will also get 24*7 technical support to help you with any and all your queries, from the experts in the respective technologies here at intellipaat throughout the certification period. So, why wait? Check out the training program and enroll today!