• Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Blocker Blocker
    • other
    • None
    • Platform: PC, OS: Windows 2000

      If you have a large number of jobs queued up waiting for an executor, it would
      be helpful if there were a means of moving a job to the front of the queue.
      Perhaps a button next to the "cancel" button with an up arrow.

      This button should only appear if there are more jobs than executors, and only
      for users with either the Admin privilege, or the Job|Build privilege.

          [JENKINS-1878] Ability to move job to top of queue

          Søren Friis added a comment - - edited

          lehlen, thanks a lot for recommending simple-queue. We have been looking for something like this for a long time.
          And big thanks to otradovec for writing the plugin!
          We have started using it, and it seems to work as intended. Very useful when e.g. a release-job needs to jump the queue.
          otradovec I have a minor bug-report for the plugin. How do I report that? There is no "issues" tab on the plugin's Github.

          Edit: I found the bug-section for this particular plugin and reported an issue here in Jira.

           

          Søren Friis added a comment - - edited lehlen , thanks a lot for recommending simple-queue. We have been looking for something like this for a long time. And big thanks to otradovec for writing the plugin! We have started using it, and it seems to work as intended. Very useful when e.g. a release-job needs to jump the queue. otradovec I have a minor bug-report for the plugin. How do I report that? There is no "issues" tab on the plugin's Github. Edit: I found the bug-section for this particular plugin and reported an issue here in Jira.  

          With the Simple Queue plugin, this issue can probably be resolved.

          Brian J Murrell added a comment - With the Simple Queue plugin, this issue can probably be resolved.

          Luis Ehlen added a comment -

          I finally ended using this other plugin: https://plugins.jenkins.io/PrioritySorter/
          you can set priorities on Jobs, but you have to do it before launch the builds.

          Luis Ehlen added a comment - I finally ended using this other plugin: https://plugins.jenkins.io/PrioritySorter/ you can set priorities on Jobs, but you have to do it before launch the builds.

          Simple queue plugin is intended to work along with Priority Sorter. If the priority of jobs remains stable, than Priority Sorter is solution, but if it changes than simple queue aims to be more flexible. There are also some other plugins that can be used in some corner cases like - Dependency queue, Accelerated build now, ... I am not sure how are they compatible, but simple q. should be compatible with priority sorter.

          Jaroslav Otradovec added a comment - Simple queue plugin is intended to work along with Priority Sorter. If the priority of jobs remains stable, than Priority Sorter is solution, but if it changes than simple queue aims to be more flexible. There are also some other plugins that can be used in some corner cases like - Dependency queue, Accelerated build now, ... I am not sure how are they compatible, but simple q. should be compatible with priority sorter.

          sorenfriis

          Thank you!

          You are right that the issue feature is not enabled in simplequeue github repo, is there any benefit in that when we have Jira?

          Jaroslav Otradovec added a comment - sorenfriis Thank you! You are right that the issue feature is not enabled in simplequeue github repo, is there any benefit in that when we have Jira?

          Recommended plugins:

          Simple queue

          Priority sorter = Advanced queue

          Dependency queue

          Jaroslav Otradovec added a comment - Recommended plugins: Simple queue Priority sorter = Advanced queue Dependency queue

          li added a comment -

          how to move to top queue in scripted pipeline ?

          li added a comment - how to move to top queue in scripted pipeline ?

          frizbog As far as I understand scripted pipeline is just the normal way how are builds/queue items created - I don't know about any plugin that would enable changing queue order from pipeline (Do you know about any?), but you can change it when it is in the queue. If some kind of build is always higher priority I would recommend using https://plugins.jenkins.io/PrioritySorter/#documentation The latest version shoul be compatible with pipeline plugin.

          Jaroslav Otradovec added a comment - frizbog As far as I understand scripted pipeline is just the normal way how are builds/queue items created - I don't know about any plugin that would enable changing queue order from pipeline (Do you know about any?), but you can change it when it is in the queue. If some kind of build is always higher priority I would recommend using https://plugins.jenkins.io/PrioritySorter/#documentation The latest version shoul be compatible with pipeline plugin.

          li added a comment -

          https://issues.jenkins.io/secure/ViewProfile.jspa?name=otradovec otradovec Thanks. If possible to move via POST such as the following? How can i fetch the itermId?

          li added a comment - https://issues.jenkins.io/secure/ViewProfile.jspa?name=otradovec otradovec  Thanks. If possible to move via POST such as the following? How can i fetch the itermId?

          limengfei It is possible to get the id under something like : http://0.0.0.0:8080/job/<job_name_here>/api/json      -> queueItem:  -> id:

          Currently there is no clear feedback when you use the same api as UI, regarding if it passed or not. Maybe checking the order in the queue?

          There is currently an issue to make it better: https://issues.jenkins.io/browse/JENKINS-66928

          Jaroslav Otradovec added a comment - limengfei It is possible to get the id under something like : http://0.0.0.0:8080/job/ <job_name_here>/api/json      -> queueItem:  -> id: Currently there is no clear feedback when you use the same api as UI, regarding if it passed or not. Maybe checking the order in the queue? There is currently an issue to make it better: https://issues.jenkins.io/browse/JENKINS-66928

            otradovec Jaroslav Otradovec
            frizbog frizbog
            Votes:
            74 Vote for this issue
            Watchers:
            72 Start watching this issue

              Created:
              Updated:
              Resolved: