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.
1.9 K Views
Jenkins User Handbook:
Are you finding difficulty in remembering all the commands that you need in order to work with Jenkins?
Guys don’t worry if you are a beginner and have no idea about how Jenkins works, this Jenkins cheat sheet will give you a quick reference of the basics that you must know to get started.
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.
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.
First go-to manage plugin and install build pipeline plugin.
To see a build pipeline, click the (+) on the dashboard
Enter any name for the view and click on the view name and choose build pipeline view.
Accept the default settings and be sure to add the name of the project at hand.
A view of entire pipeline with statuses will be visible.
To uninstall plugins, go-to manage plugins and click on the installed tab and click on uninstall for the plugin. Ensure to restart Jenkins for changes to take effect
In Case of need to install an older version of the plugin, download from the site and click on Upload option to do it manually.
Ability to have secure config for different users in place.
Click on manage Jenkins and Configure global security
Set parameters in the enable security section
Add the users and go-to ‘manage users’ option to provide permissions
To set authorizations, go-to configure global security, and click on matrix-based security
Add and giver needed permissions to the user.
Now, you know the most important skill set of a DevOps Engineer. But, do you know, DevOps Engineers are among the highest paid professionals in the technology domain? so join DevOps training in Hyderabad!
The Backup plugin adds a new Backup manager item in the Manage Jenkins page.
This setting allows:
To tweak backup settings via setup
To backup Jenkins config
To restore config from a previous backup.
Alternatively, you can use SCM (sync config plugin) or ThinBackup for global and job configurations.
Selenium tests can be run on remote slave machines via master slave and selenium suite plugin installation
Step 1: go-to master Jenkins server and manage nodes
Step 2: Click on configure for the slave machine
Step 3: put the launch method as ‘Launch slave agents via Java Web Start’
Step 4: open a browser instance of the master Jenkin on the slave machine, then manage nodes and select the DXBMEM30
Step 5: Scroll down and select the launch option and hit run
Step 6: Configure tests to run on the slave
Step 7: make sure the selenium part of the job is configured. Make sure that the Sample.html file and the selenium-server.jar
Get in touch with Intellipaat for a comprehensive DevOps Training and be a certified DevOps Engineer!
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!