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

            People

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

              Dates

                Created:
                Updated: