RegEx Job Filter for SCM Not Working

47 views
Skip to first unread message

Sverre Moe

unread,
Apr 7, 2020, 4:42:54 AM4/7/20
to Jenkins Users
I am trying to get the Regular Expression Job Filter to work with SCM Configuration.

Regular Expression: ssh://g...@git.company.com/various/.*
Match Value: Job SCM Configuration
Match Type: Include Matched

But no jobs are listed in the View. I want it to list all jobs that have SCM configuration with the various namespace.
I have also tried with the following regular expressions
.*/various/.*
./various/.

According to documentation for the View Job Filter Plugin
SCM Configuration - this one is perhaps the best bang for the buck - put in something like "./my-office-name/." to automatically include all jobs that are organized under source control already by office.

Sverre Moe

unread,
May 4, 2020, 5:51:52 AM5/4/20
to Jenkins Users
According to documentation it should be possible.

It would greatly reduce the Jenkins Configuration by Code in jenkins.yaml
Not needing to list each and every jobs for each View, makes maintenace much easier.

This is my JCaC configuration that does not work:
  - list:
      columns
:
     
- "jobName"
     
- "lastSuccess"
     
- "lastFailure"
     
- "lastDuration"
      description
: "<h3>systems builds</h3>\r\nContains projects under systems namespace"
      jobFilters
:
     
- regExJobFilter:
          includeExcludeTypeString
: "includeMatched"
          matchDisplayName
: false
          matchFullDisplayName
: false
          matchFullName
: false
          matchName
: true
          regex
: "ssh://g...@git.company.com/systems/.*"
          valueTypeString
: "SCM"
      name
: "Systems"

The JCaC would be difficult to maintain if I had to list each jobs in this file for each view.

Sverre Moe

unread,
May 10, 2020, 10:16:05 AM5/10/20
to Jenkins Users
The plugin does not support Pipeline projects for SCM Configuration filtering on RegEx.
I have created a change request: https://issues.jenkins-ci.org/browse/JENKINS-62233
Reply all
Reply to author
Forward
0 new messages