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

Cron DSL behavior changed resulting in no cron expressions in generated jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • 1: Jenkins 2.98, Job DSL 1.67
      2: Jenkins: 2.112, Job DSL 1.69

      Expected Behavior: The following should create a cron entry in a generated job:

      freeStyleJob('example') {
        triggers {
          cron('@daily')
        }
      }

      Actual Behavior: Job is generated without any cron entry.

      Workaround: The following produces a correctly configured job (has cron entry):

      freeStyleJob('example') {
        triggers {
          cron{
            spec('@daily')
          }
        }   
      }

      At some point prior to the mentioned versions, the first DSL example worked fine (and should still work according to the generated documentation)

      I'm not sure exactly when the old DSL stopped working, but I'm guessing that this was unintentional.

      Note also that my generated documentation has the "spec" closure, while the official documentation does not.

       

            daspilker Daniel Spilker
            akom Alexander Komarov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: