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.

          [JENKINS-33588] Branches and Repositories prioritization

          Alexander Vorobiev created issue -

          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.

          Magnus Sandberg added a comment - 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.

          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...

          Alexander Vorobiev added a comment - 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...

          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.

          Magnus Sandberg added a comment - 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.

          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.

          Alexander Vorobiev added a comment - 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.
          Alexander Vorobiev made changes -
          Description Original: 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.
          New: 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.

          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.

          Magnus Sandberg added a comment - 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.
          Jesse Glick made changes -
          Component/s Original: workflow-plugin [ 18820 ]
          Alexander Vorobiev made changes -
          Component/s New: workflow-plugin [ 18820 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 169540 ] New: JNJira + In-Review [ 183540 ]

            Unassigned Unassigned
            vorobievalex Alexander Vorobiev
            Votes:
            3 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: