Add support for regex job filtering in Jenkins

Description

In our Jenkins instance, we have > 3,000 jobs. Not all of those jobs need to be sync'ed between JIRA and Jenkins. As as admin, of Jenkins, I'd like to be able to set a regex filter on what jobs gets exposed by the JIRA Plugin for Jenkins.

Environment

None

Activity

Show:

Mark Rekveld March 24, 2017 at 7:02 PM

Aha OK thanks for clarifying. I understand what you are looking for, but this is not something that can be created in the Jenkins side. For the synchronization process, the JIRA add-on uses the out-of-the-box default JSON API provided by Jenkins.

I have tried before to compliment this API, but this had a negative performance side-effect. So now the JIRA add-on simply uses the /api/json suffixed urls for synchronizing jobs and builds.

It should be possible to accomplish a similar effect by implementing this in the JIRA add-on, simply ignoring jobs that match a regex, like to stated for example.

 

Mike Delaney March 24, 2017 at 5:30 PM

I wouldn't say limit, but we have a number of odd jobs (lets say they all start with maintenance), that I'd like to omit from JIRA even knowing about because it's useless; no JIRA issue will be mentioned in their builds. For my example, I would go to the Jenkins admin page (http://<jenkins-url>/configure), and from there give a list of regular expressions I'd like omitted from the synchronization process.

I do understand that I can go to JIRA and 'disable' synchronization for some jobs but, to me, it feels more natural to do this in Jenkins.

Mark Rekveld March 24, 2017 at 3:27 PM

Hi,

I'm not sure I follow fully. The newer versions of the Jenkins side plugin use a global build listener to trigger JIRA for synchronization. Then on the JIRA side, only enabled jobs will get synchronized, disabled jobs are simply ignored. So on the Jenkins side would not really help out I think.

Or are you looking for a way to limit the number of jobs shown on the configuration page?

Cheers,

Mark

Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Components

Priority

Zoom

Open Zoom
Created March 24, 2017 at 2:02 PM
Updated March 24, 2017 at 7:02 PM
Zoom