Well organised — Jenkins Dashboard
In previous articles in this series we learnt,
- What is a Job in Jenkins?
- We looked at configuration steps in a job
- How to create a simple free-style Jenkins Job?
- Also some of the advance configuration options for a Jenkins Job.
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”
- 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.*
Steps to Create a Jenkins “Folders”
Steps to delete views & folders
- 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.