[JIRA] [prioritysorter-plugin] (JENKINS-33588) Branches and Repositories prioritization

6 views
Skip to first unread message

vorobievalex@yandex.ru (JIRA)

unread,
Mar 16, 2016, 8:54:02 AM3/16/16
to jenkinsc...@googlegroups.com
Alexander Vorobiev created an issue
 
Jenkins / Improvement JENKINS-33588
Branches and Repositories prioritization
Issue Type: Improvement Improvement
Assignee: Magnus Sandberg
Components: prioritysorter-plugin, workflow-plugin
Created: 16/Mar/16 12:53 PM
Environment: Jenkins 2.0, organization folders
Labels: workflow github
Priority: Major Major
Reporter: Alexander Vorobiev

As a development team with github organization account and with limited CI servers bandwidth we would like to have commits on production branches to be built before the intermediate commits to personal development branches.
In addition some repositories are more critical then the others, so builds for that repositories need to be prioritized.

In Jenkins 1.x I could manage this with Priority Sorter Plugin in combination with Views and Jobs properties.
I could not find a way to do it for the organization folder with pipeline as code.

For example for Git Flow I need branches that match 'hotfix/.' have more priority than master branch which is above 'release/.' branches which is above Dev branch and above all the other branches.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

emsa@switchbeat.com (JIRA)

unread,
Mar 16, 2016, 9:14:01 AM3/16/16
to jenkinsc...@googlegroups.com
Magnus Sandberg commented on Improvement JENKINS-33588
 
Re: Branches and Repositories prioritization

The plugin primarily work on a Job. I guess that different repos are build by different Jobs so that should not be a problem for you.

Making prioritization in branch would (probably) require some new extension to the plugin - or as a work around you could have different Jobs for different branches and that would solve the issue.

vorobievalex@yandex.ru (JIRA)

unread,
Mar 16, 2016, 9:33:01 AM3/16/16
to jenkinsc...@googlegroups.com

I expected that for repos prioritization I could use Jobs included in Folder strategy, but in my installation of Jenkins 2.0 with several repos:
if I go to Job Priorities > JobGroup > Jobs included in Folder, Apply to Jobs in Folder list is empty.

Yet I see no other strict way to priorities repos jobs...

emsa@switchbeat.com (JIRA)

unread,
Mar 16, 2016, 9:38:02 AM3/16/16
to jenkinsc...@googlegroups.com

On the Priority Sorter Configuration you will not get the current list of Jobs - but the sorter will apply the priority to any Job it find in the specified Folder.

vorobievalex@yandex.ru (JIRA)

unread,
Mar 16, 2016, 9:46:03 AM3/16/16
to jenkinsc...@googlegroups.com

Agree, but I assume that 'Apply to Jobs in Folder' should list available folders. The problem is that list of folder is empty, so I cannot specify a folder.
I did not expect jobs there, sorry for ambiguous explanation.

vorobievalex@yandex.ru (JIRA)

unread,
Mar 28, 2016, 9:33:01 AM3/28/16
to jenkinsc...@googlegroups.com
Alexander Vorobiev updated an issue
Change By: Alexander Vorobiev
As a development team with github organization account and with limited CI servers bandwidth we would like to have commits on production branches to be built before the intermediate commits to personal development branches.
In addition some repositories are more critical then the others, so builds for that repositories need to be prioritized.

In Jenkins 1.x I could manage this with Priority Sorter Plugin in combination with Views and Jobs properties.
I could not find a way to do it for the organization folder with pipeline as code.

For example for Git Flow I need branches that match 'hotfix/.*' have more priority than  '  master '  branch which is above 'release/.*' branches which is above Dev branch and above all the other branches.
One more job type in Jenkins 2.0 is Pull Request. There might be Pull request to hot fix branches/to master/to release/to feature development branches, while there is no way to determine this. It makes sense to prioritize it by PR title.

emsa@switchbeat.com (JIRA)

unread,
Mar 28, 2016, 10:18:02 AM3/28/16
to jenkinsc...@googlegroups.com

The Folder list should not be empty if you have Folders in your setup.

When it comes to new ways to prioritize jobs it is as easy as adding a new implementation of the correct extension point (https://github.com/jenkinsci/priority-sorter-plugin/blob/master/src/main/java/jenkins/advancedqueue/priority/PriorityStrategy.java).

I have no time to work on additions to the plugin right now but I'd be happy to review any pull request.

jglick@cloudbees.com (JIRA)

unread,
Apr 20, 2016, 4:33:01 PM4/20/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: workflow-plugin

vorobievalex@yandex.ru (JIRA)

unread,
Jun 2, 2016, 10:52:01 AM6/2/16
to jenkinsc...@googlegroups.com
Alexander Vorobiev updated an issue
Change By: Alexander Vorobiev
Component/s: workflow-plugin

jglick@cloudbees.com (JIRA)

unread,
Aug 29, 2016, 4:45:08 PM8/29/16
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: pipeline
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

winarto@gmail.com (JIRA)

unread,
May 14, 2018, 11:09:02 AM5/14/18
to jenkinsc...@googlegroups.com

Magnus Sandberg, Could you give me example how I can prioritize release branch over master branch over feature branch on single repo? All of them are within a single repository and single folder.

This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo

benjamin.kihm@scheer-group.com (JIRA)

unread,
May 9, 2019, 4:57:02 AM5/9/19
to jenkinsc...@googlegroups.com

In our organisation we have many multi-pipeline jobs and each of them have a master and some release branches which we want to queueing faster than development branches.

The existing workaround to create for each master/release branch a different job will blow up our jenkins with many additional workspaces/views for the jobs.

Is there a plan to add this feature on branch level soon?

Thanks for future replies.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

benjamin.kihm@scheer-group.com (JIRA)

unread,
Jul 24, 2019, 4:48:02 AM7/24/19
to jenkinsc...@googlegroups.com

I think I managed a possible solution with the existing plugin. I created three new views which contain all master/release/all Jobs. With this three groups I managed to prioritize release > master > all jobs  by group priority. Seems to work for us.

benjamin.kihm@scheer-group.com (JIRA)

unread,
Jul 24, 2019, 4:54:02 AM7/24/19
to jenkinsc...@googlegroups.com
Benjamin Kihm edited a comment on Improvement JENKINS-33588
I think I managed a possible solution with the existing plugin. I created three new views which contain all master/release/all Jobs by a regular expression . With this three groups I managed to prioritize release > master > all jobs  by group priority. Seems to work for us.

benjamin.kihm@scheer-group.com (JIRA)

unread,
Jul 24, 2019, 4:55:03 AM7/24/19
to jenkinsc...@googlegroups.com
Benjamin Kihm edited a comment on Improvement JENKINS-33588
I think I managed a possible solution with the existing plugin. I created three new views which contain all master/release/all Jobs by a regular expression. With this three groups I managed to prioritize release > master > all jobs  by group priority. Seems to work for us.

 

I think you can also create another Jenkins view with only hotfix in it and give it a higher prio than release branches.

benjamin.kihm@scheer-group.com (JIRA)

unread,
Jul 24, 2019, 4:56:02 AM7/24/19
to jenkinsc...@googlegroups.com
Benjamin Kihm edited a comment on Improvement JENKINS-33588
I think I managed a possible solution with the existing plugin. I created three new views which contain all master/release/all Jobs by a regular expression. With this three groups I managed to prioritize release > master > all jobs  by group priority. Seems to work for us.

 

[~vorobievalex]: I think you can also create another Jenkins view with only hotfix in it and give it a higher prio than release branches.
Reply all
Reply to author
Forward
0 new messages