Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-64970

It's not possible to prevent cron triggers via BranchProperty

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have a multibranch pipeline. All branches have the same pipeline definition (via https://plugins.jenkins.io/inline-pipeline/ ) that includes both scm and cron triggers for good reasons.

      Branches are obsolete at some point, and all future builds will fail, also for good reasons. There will be no SCM changes anymore, but the cron trigger still fires.

      Is there a way to skip builds, or configure the multibranch project (branch properties?) in some way that will stop obsolete branches from building without deleting the corresponding project and all past builds in Jenkins?

      I do not want to delete a branch's project, nor do I want that branch's old builds to get deleted, so excluding the branch from branch discovery is not an option.

      I do not think this is possible currently. TimerTrigger is defined in core and so could not check jenkins.branch.Branch.Dead. Probably branch-api should define a QueueDecisionHandler.

      Filed as requested by Jesse Glick

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            danielbeck Daniel Beck
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: