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

Directive Generator: `when` is missing `isRestartedRun()`

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • Jenkins:
      - Core 2.127
      - Experimental UC plugins
      - Declarative at 1.3.0-SNAPSHOT, which was master at commit eeb92e42

      Summary
      When using the Directive Generator, the generator for when is missing isRestartedRun().

      Steps to recreate
      1. Go to the Declarative Directive Generator via http://1.2.3.4:8080/job/your-pipeline-job/directive-generator/

      2. Pick the Sample Directive: when

      3. Look in the dropdown for When Condition. I was expecting to see `isRestartedRun`, but it's not there.

          [JENKINS-51932] Directive Generator: `when` is missing `isRestartedRun()`

          Karl Shultz created issue -
          Karl Shultz made changes -
          Attachment New: image-2018-06-13-14-59-55-242.png [ 42860 ]
          Description Original: *Summary*
          When using the Directive Generator, building a {{when}} / {{allOf}} directive with no conditions attached produces a NPE. This was another accidental find.

          *Steps to recreate*
          1. Go to the Declarative Directive Generator via {{http://1.2.3.4:8080/job/your-pipeline-job/directive-generator/}}

          2. Set it up as follows:
          * Sample Directive: {{when}}
          * whenCondition: {{allOf}}
          * Execute the stage if all nested conditions are true: no selections made

          3. And press the Generate Declarative Directive button, you'll get a NPE in your sample:
          {code:none}
          when {
            // ERROR TRANSLATING CONDITIONAL: java.lang.NullPointerException
          }
          {code}

          Accidental find.

           !image-2018-06-13-14-36-02-967.png|thumbnail!
          New: *Summary*
          When using the Directive Generator, the generator for {{when}} is missing {{isRestartedRun()}}.

          *Steps to recreate*
          1. Go to the Declarative Directive Generator via {{http://1.2.3.4:8080/job/your-pipeline-job/directive-generator/}}

          2. Pick the Sample Directive: {{when}}

          3. Look in the dropdown for When Condition. I was expecting to see `isRestartedRun`, but it's not there.

           !image-2018-06-13-14-59-55-242.png|thumbnail!
          Andrew Bayer made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Andrew Bayer made changes -
          Status Original: In Progress [ 3 ] New: In Review [ 10005 ]
          Andrew Bayer made changes -
          Remote Link New: This issue links to "PR #279 (Web Link)" [ 21272 ]
          Andrew Bayer made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Review [ 10005 ] New: Resolved [ 5 ]
          Andrew Bayer made changes -
          Link New: This issue is duplicated by JENKINS-48661 [ JENKINS-48661 ]
          Liam Newman made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

            abayer Andrew Bayer
            kshultz Karl Shultz
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: