I'd like to use a cron trigger on a multibranch pipeline to run only one branch, or, more generally, to be able to use conditional triggers in pipelines.

      It would be great if it could be done in pipeline's code, like:

      pipeline {
          triggers {
              when { branch "master" }
              cron('H */4 * * 1-5')
          }

          [JENKINS-48898] Multibranch pipeline: conditional triggers

          Łukasz Dudek created issue -
          Andrew Bayer made changes -
          Component/s New: pipeline-model-definition-plugin [ 21706 ]
          Component/s Original: pipeline [ 21692 ]
          Component/s Original: pipeline-multibranch-defaults-plugin [ 21926 ]
          Andrew Bayer made changes -
          Assignee Original: Denis Saponenko [ vaimr ] New: Andrew Bayer [ abayer ]
          Andrew Bayer made changes -
          Link New: This issue duplicates JENKINS-42643 [ JENKINS-42643 ]
          Andrew Bayer made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          When can we expect this to be released?

          Alfredo Moreira added a comment - When can we expect this to be released?

          Liam Newman added a comment -

          Bulk closing resolved issues.

          Liam Newman added a comment - Bulk closing resolved issues.
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            ljbd Łukasz Dudek
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: