Well organised — Jenkins Dashboard

Arati AK Bhandare
4 min readFeb 11, 2023

--

In previous articles in this series we learnt,

In today’s article we look at how we can “well-organise” our Jenkins Dashboard.

Why do we need a “Organised” Jenkins Dashboard?

  • It reduces probability of error.
  • It increases productivity.
  • Using below technique, users can easily manage and maintain Jenkins dashboard with large number of jobs running on Jenkins server
  • Space optimisation and cleanup of unwanted data & jobs is easier.

Jenkins allows you to define views and include jobs based on name, individual selection etc. Jenkins has functionality to organise jobs into views and folders

  • Views provide ways of associating jobs on the dashboard & displaying them together.
  • Views can be considered as filter, that displays only jobs that satisfy a specified criteria.
  • These views will show up as tabs on the initial screen. If you notice the, default “All” tab on Jenkins UI is also a view where you can see list of all the jobs currently configured.
  • Folders they are used to group things together.
  • They allow us to create structures, that are very similar to filesystem on disk.
  • They contain jobs, views and other folders.
  • Folders also have completely separate namespace from other folders allowing user to create a hierarchies that have similar characteristics like jobs that have same name.

Steps to Create a Jenkins “View”

Give it name, select the way you want it to be displayed.
Add a short description
You can manually select jobs from “Job Filters” list
  • To avoid making changes to view when new “build” jobs are added, we could use “regular expression” option. This will automatically show all existing and new jobs with name “build” in this view.
.*BUILD.*
You can add a column from select input or remove a columns from the view as per your need
On clicking “OK” you can see the new “Build” view that you created right next “All” tab

Steps to Create a Jenkins “Folders”

Select “new item” option from menu same as one used to create jobs. Choose type “Folder” and click OK
Add short description for Folder
An “empty” folder with given name “Cyclones” is created.
From jobs list, right click on job that you wish to “move” to the folder
“move” to the Jenkins => Cyclone folder
Jobs have to moved manually into folders
Now if look at our “Build” that we created in earlier steps, it becomes “empty”
We have go to “Edit view” option and check “Recurse in subfolders” checkbox to put back Jobs in view
We get a “perfect” combination of views & folders to organise Jenkins jobs.

Steps to delete views & folders

Go to tab with a view you want to delete, click “delete view” link
Confirm delete action. View will be deleted, but Jobs remain as it is
Go to folder that you wish to delete, click “Delete Folder” option
Confirm delete action.
  • In case folder all it contents, i.e. jobs, views and other folders everything will be deleted. Job configs are stored on disk under $JENKINS_HOME/jobs , so if you have a backup of that directory, only then you can restore the job. Otherwise, there’s no “recycle bin” for deleted jobs in Jenkins. This action should be done with caution.

Conclusion

Utilised properly, the views and folder options in Jenkins allow you to organise your jobs into a neat structure which is easy to read, use and manage.

You can also use “View Job Filters” plugin as well to manage multiple views and hundreds of jobs much more easily. This plug-in provides more ways to include/exclude jobs from a view, including filtering by SCM path, and by any job or build status type, as well as “chaining” of filters and negating filters.

--

--