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

Merge beforeOptions, beforeInput and beforeAgent into a single before attribute

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          bitwiseman Liam Newman added a comment - - edited

          This is totally doable and would likely have minimal impact.  It could even be done without changing the underlying AST representation if needed.

          Falko Modler 

          Are you interested in submitting this change? 

          Show
          bitwiseman Liam Newman added a comment - - edited This is totally doable and would likely have minimal impact.  It could even be done without changing the underlying AST representation if needed. Falko Modler   Are you interested in submitting this change? 
          Hide
          famod Falko Modler added a comment -

          Liam Newman While I am always glad to help improving Jenkins (plugins) I currently don't have time for this, sorry.

          PS: Are you sure about changing the example from before 'options' to before git? Right now we don't have beforeGit, so do you have something new in mind?

          Show
          famod Falko Modler added a comment - Liam Newman While I am always glad to help improving Jenkins (plugins) I currently don't have time for this, sorry. PS: Are you sure about changing the example from before 'options' to before git ? Right now we don't have beforeGit , so do you have something new in mind?
          Hide
          bitwiseman Liam Newman added a comment -

          Ah, I was thinking we migrate to the `before '*'` style first and add other values later.  

          Show
          bitwiseman Liam Newman added a comment - Ah, I was thinking we migrate to the `before '*'` style first and add other values later.  

            People

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

              Dates

              Created:
              Updated: