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

Merge beforeOptions, beforeInput and beforeAgent into a single before attribute

      There are now three different before attributes for when which are evaluated in this very order:

      • beforeOptions
      • beforeInput
      • beforeAgent

      The documentation tries to describe this "highlander principle" but it would be much more logical and readable if there was only a single attribute before allowing only a single value of options, input or agent.
      E.g.:

          when {
              before git 
              // ...
          }
      

      Migration consideration: The old dedicated before attributes should not be removed right away. Instead those attributes should be marked deprecated and their usage should yield warnings in the log.

          [JENKINS-59980] Merge beforeOptions, beforeInput and beforeAgent into a single before attribute

          Falko Modler created issue -
          Falko Modler made changes -
          Description Original: There are now _three_ different {{before}} attributes for {{when}} which are evaluated in this very order:
          - {{beforeOptions}}
          - {{beforeInput}}
          - {{beforeAgent}}

          The documentation tries to describe this "highlander principle" but it would be much more logical and readable if there was only a single attribute {{before}} allowing only a single value of {{options}}, {{input}} or {{agent}}.
          E.g.:
          {noformat}
              when {
                  before 'options'
                  // ...
              }
          {noformat}
          New: There are now _three_ different {{before}} attributes for {{when}} which are evaluated in this very order:
          - {{beforeOptions}}
          - {{beforeInput}}
          - {{beforeAgent}}

          The documentation tries to describe this "highlander principle" but it would be much more logical and readable if there was only a single attribute {{before}} allowing only a single value of {{options}}, {{input}} or {{agent}}.
          E.g.:
          {noformat}
              when {
                  before 'options'
                  // ...
              }
          {noformat}

          Migration consideration: The old dedicated {{before}} attributes should not be removed right away. Instead those attributes should be marked deprecated and their usage should yield warnings in the log.
          Liam Newman made changes -
          Description Original: There are now _three_ different {{before}} attributes for {{when}} which are evaluated in this very order:
          - {{beforeOptions}}
          - {{beforeInput}}
          - {{beforeAgent}}

          The documentation tries to describe this "highlander principle" but it would be much more logical and readable if there was only a single attribute {{before}} allowing only a single value of {{options}}, {{input}} or {{agent}}.
          E.g.:
          {noformat}
              when {
                  before 'options'
                  // ...
              }
          {noformat}

          Migration consideration: The old dedicated {{before}} attributes should not be removed right away. Instead those attributes should be marked deprecated and their usage should yield warnings in the log.
          New: There are now _three_ different {{before}} attributes for {{when}} which are evaluated in this very order:
           - {{beforeOptions}}
           - {{beforeInput}}
           - {{beforeAgent}}

          The documentation tries to describe this "highlander principle" but it would be much more logical and readable if there was only a single attribute {{before}} allowing only a single value of {{options}}, {{input}} or {{agent}}.
           E.g.:
          {noformat}
              when {
                  before git
                  // ...
              }
          {noformat}
          Migration consideration: The old dedicated {{before}} attributes should not be removed right away. Instead those attributes should be marked deprecated and their usage should yield warnings in the log.
          Liam Newman made changes -
          Assignee Original: Andrew Bayer [ abayer ]

            Unassigned Unassigned
            famod Falko Modler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: