How can you distinguish a build from a repository class programatiically looking at tasks in Jenkins.instance.queue.items

  Kiến thức lập trình

We are having issues with repo scans burning through our api limit and I want to modify jobdsl seed job such that after it runs, it stops storm of repo-scans. We use webhooks any way so the scans aren’t really necessary (except to force execution of log rotation).

Jenkins.instance.queue.items Is the queue but I’m not sure how to tell a build from a repo scan.

It looks like the following are there. I just haven’t yet been able to identify a scan

  • org.jenkinsci.plugins.workflow.job.WorkflowJob
  • org.jenkinsci.plugins.workflow.support.steps.ExecutorStepExecution$PlaceholderTask

LEAVE A COMMENT