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

Conditional application of triggers in Declarative

    XMLWordPrintable

Details

    Description

      I want to be able to use trigger with cron but only for the master branch.

      if and when both don't work in the trigger context.

      Here is what I expected to work:

       

      if (env.BRANCH == 'master') {
        trigger { cron('@daily') }
      }
      

      Attachments

        Issue Links

          Activity

            docwhat Christian Höltje created issue -
            abayer Andrew Bayer made changes -
            Field Original Value New Value
            Summary when/if doesn't work in trigger Conditional application of triggers in Declarative
            abayer Andrew Bayer made changes -
            Issue Type Bug [ 1 ] Improvement [ 4 ]
            abayer Andrew Bayer made changes -
            Link This issue is duplicated by JENKINS-48898 [ JENKINS-48898 ]
            laeubi Christoph Läubrich made changes -
            Link This issue relates to JENKINS-52203 [ JENKINS-52203 ]
            abayer Andrew Bayer made changes -
            Assignee Andrew Bayer [ abayer ]

            People

              Unassigned Unassigned
              docwhat Christian Höltje
              Votes:
              47 Vote for this issue
              Watchers:
              59 Start watching this issue

              Dates

                Created:
                Updated: