Giter Site home page Giter Site logo

mpokornyetm / categorized-view-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jenkinsci/categorized-view-plugin

0.0 0.0 0.0 340 KB

This is a plugin to create a new view named Categorized Jobs View, where jobs are grouped dynamically by regular expressions

Home Page: https://plugins.jenkins.io/categorized-view/

License: GNU General Public License v3.0

JavaScript 25.24% Java 69.87% Groovy 1.24% CSS 1.20% HTML 2.44%

categorized-view-plugin's Introduction

Categorized View

Introduce a new kind of view where you can categorize groups of jobs under a single label created by regular expressions or other criterias that can be implemented as extension points.

Description

This plugin allows you to create a new view that is very similar to the standard Jenkins List Views, but where you can group jobs and categorize them according to regular expressions. The functionality is better explained with images.

Let's suppose you have several jobs with a common prefix, such as the software version of a specific branch. The versions follow a pattern. For example, this is the usual "All" view for the jobs:

You start by creating a "Categorized Jobs View" from the view creation button, and you will find the following new section (Job group categorization):

Besides the categorization configuration, all the other options apply without any changes. After you create the view, the result will be the following:

That is, the jobs are now categorized under the labels derived from the regular expression.

Usage

To create the view, just follow the usual procedure to add new views and you will find a new type of view named "Categorized Jobs View".

The configuration page has a new section, "Job group categorization". You can add as many expressions as you want. For each expression, there are two fields:

  • Regex for categorization: regular expression to match job names that will be part of this category
  • Naming Rule: The name of the category. You can use $1 to use the match to create the category name.

You are not forced to use complex regular expressions. Let's suppose you just want to add some specific jobs to a given category. You can use the following:

  • Regex for categorization: ^Name of Job 1\|Name of Job 2\|...$
  • Naming Rule: My Jobs

Just notice that I put ^ and $, which are regular expressions meta symbols to match start and end of string. You have to put it to make sure you won't get other jobs whose name contains the jobs listed above (such as "foo Name of Job 1").

A few things to keep in mind:

  • The groups are not mutually exclusive. It is possible for two distinct groups to have a non empty intersection of jobs.
  • If you create multiple rules that map to the same group, it will be a single group. It won't create multiple groups with the same name (as expected)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.