Jenkins Views: Create and Configure Multiple Views

Jenkins has an amazing feature called Views. It allows us to organize Jenkins jobs in a tabbed manner. We can create different views in Jenkins for several jobs related to a respective project. It makes organizing the jobs a lot easier.

 

We will learn how to create Views in Jenkins and organize different jobs for different projects with some simple and easy configurations.

 

Scenario:

There are 3 projects which have different Jenkins Jobs for different environments as follows:

✔  Project1: Dev-P1, Stage-P1, and Prod-P1.

✔  Project2: Dev-P2, QA-P2, and Prod-P2.

✔  Project3: Dev-P3, Stage-P3, QA-P3, and Prod-P3.

 

Step 1: Creating the First View.

✔  Login into Jenkins.

✔  On the dashboard, click on the Plus (+) icon to create a new view.

 

create_view

 

✔  Give an appropriate name of the view (For eg. Project1) and check the List View.

list-view

 

✔  Click OK.

✔  On the next page, give a nice Description.

✔  In the Job Filters option, you can choose any already existing projects to add to the new view if needed. We will not choose any as we will create it later on.

✔  Click the OK button.

Project1 view is ready and here also it provides an option to add some existing jobs and to create a new one.

 

project1_view

 

Step 2. Creating other Views.

Follow the same steps as above to create the other 2 views and provide the appropriate names i.e. Project2 and Project3.

 

other_views

 

Step 3. Creating jobs for Project1.

Go to the Project1 view and create some new demo projects with name as follows:

✔  Dev-P1

 ✔  Stage-P1

 ✔  Prod-P1

 

project1-view

Step 4. Creating jobs for Project2.

Go to the Project1 view and create some new demo projects with name as follows:

✔  Dev-P2

✔  QA-P2

✔  Prod-P2

project2_view

Step 5. Creating jobs for Project3.

Go to the Project1 view and create some new demo projects with name as follows:

✔  Dev-P3

✔  Stage-P3

✔  QA-P3

✔  Prod-P3

 

project3_view

 

Conclusion:

We have now 3 views for different projects organized in a tabbed manner which makes it easier for a new user or an existing user to understand and manage several projects.

 

Assignment:

Explore the other options of Jenkins View while creating a new View.