Details

    • Similar Issues:

      Description

      It would be nice if there was a bulk API for shelving projects in batch.

      This would be used by seed jobs (via the job-dsl plugin) when unneeded jobs are automatically discarded and shelved. The bulk API would avoid avoid flooding the build queue with shelve tasks when there are many jobs to be discarded.

      See https://github.com/jenkinsci/job-dsl-plugin/pull/1174#discussion_r292322461 for the request.

        Attachments

          Issue Links

            Activity

            Hide
            capf Carsten Pfeiffer added a comment -

            It would be great if this bulk mode would transparently handle jobs as well as folders. That way, the jobdsl plugin would not need to take care to first shelve jobs, wait for that to finish and then delete the folders, for example.

            Show
            capf Carsten Pfeiffer added a comment - It would be great if this bulk mode would transparently handle jobs as well as folders. That way, the jobdsl plugin would not need to take care to first shelve jobs, wait for that to finish and then delete the folders, for example.
            Hide
            capf Carsten Pfeiffer added a comment -

            Now that shelving of plain {{hudson.model.Item}}s is possible in 5dc264b, it would be great to have an API for shelving a bunch of Item-instances in one go. This would take care of resolving the minimum set of items to shelve (e.g. if a parent item shall be shelved, do not shelve the child items as well).

            Currently, the job-dsl-plugin invokes the shelving like this:

            jenkins.getQueue().schedule(new ShelveProjectTask(item), 0);
            

            The new API might be something as simple as this:

            List<Item> items = ...;
            List<Item> itemsToBeShelved = new ShelveItemResolver().resolve(items);
            jenkins.getQueue().schedule(new ShelveItemsTask(itemsToBeShelved), 0);
            

            WDYT?

            Show
            capf Carsten Pfeiffer added a comment - Now that shelving of plain {{hudson.model.Item}}s is possible in 5dc264b, it would be great to have an API for shelving a bunch of Item-instances in one go. This would take care of resolving the minimum set of items to shelve (e.g. if a parent item shall be shelved, do not shelve the child items as well). Currently, the job-dsl-plugin invokes the shelving like this: jenkins.getQueue().schedule( new ShelveProjectTask(item), 0); The new API might be something as simple as this: List<Item> items = ...; List<Item> itemsToBeShelved = new ShelveItemResolver().resolve(items); jenkins.getQueue().schedule( new ShelveItemsTask(itemsToBeShelved), 0); WDYT?

              People

              • Assignee:
                pierrebtz Pierre Beitz
                Reporter:
                capf Carsten Pfeiffer
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: