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

Step types with no editor can be edited as pipeline model script

    Details

    • Similar Issues:
    • Sprint:
      christmas

      Description

      Following on from: https://issues.jenkins-ci.org/browse/JENKINS-38590

      When there is a step of unknown type, its json object can be rendered by the pipeline-model plugin as the Jenkinsfile form (a line of text), this can then be shown in a text box and editable (when an edit is made, it can be transformed back to the json object form by the pipeline model plugin).

      In scope:

      • Display text box in case of unsupported step type
      • Conversion of step object to text
      • Displaying of editable text
      • Conversion of text to object
      • Works with block scoped steps as well as simple steps

      Some more details, using an example:

       "steps": [      {
              "name": "node",
              "arguments":         {
                "isConstant": true,
                "value": "some-label"
              },
              "children": [        {
                "name": "sh",
                "arguments":           {
                  "isConstant": true,
                  "value": "echo ONSLAVE=$ONSLAVE"
                }
              }]
            }]
      

      (from https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/master/src/test/resources/json/agentNoneWithNode.json)

      In this case, it is the "node" step (say we don't have a form based editor for it). In that case the entire object that is the "node" step from that step listing can be converted to textual form and displayed in a box (and then back).

      This is a good catch all for unsupported steps.

        Attachments

          Issue Links

            Activity

            michaelneale Michael Neale created issue -
            michaelneale Michael Neale made changes -
            Field Original Value New Value
            Epic Link JENKINS-36291 [ 172300 ]
            michaelneale Michael Neale made changes -
            Link This issue relates to JENKINS-38590 [ JENKINS-38590 ]
            jamesdumay James Dumay made changes -
            Assignee Keith Zantow [ kzantow ]
            jamesdumay James Dumay made changes -
            Sprint release candidate [ 171 ]
            jamesdumay James Dumay made changes -
            Rank Ranked higher
            Hide
            michaelneale Michael Neale added a comment -

            Is this still needed now Keith Zantow - given that steps can use a generic form editor now?

            Show
            michaelneale Michael Neale added a comment - Is this still needed now Keith Zantow - given that steps can use a generic form editor now?
            Hide
            kzantow Keith Zantow added a comment -

            It's hypothetical that someone has a jenkinsfile with a step defined, perhaps from a library that doesn't have metadata to generate the generic form editor, so this probably is necessary (and not hard to do) if there is missing metadata for whatever reason

            Show
            kzantow Keith Zantow added a comment - It's hypothetical that someone has a jenkinsfile with a step defined, perhaps from a library that doesn't have metadata to generate the generic form editor, so this probably is necessary (and not hard to do) if there is missing metadata for whatever reason
            kzantow Keith Zantow made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            kzantow Keith Zantow made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            kzantow Keith Zantow made changes -
            Remote Link This issue links to "Part of PR 12 (Web Link)" [ 15191 ]
            jamesdumay James Dumay made changes -
            Sprint release candidate [ 171 ] christmas [ 176 ]
            jamesdumay James Dumay made changes -
            Rank Ranked lower
            kzantow Keith Zantow made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            kzantow Keith Zantow made changes -
            Link This issue is related to JENKINS-38590 [ JENKINS-38590 ]

              People

              • Assignee:
                kzantow Keith Zantow
                Reporter:
                michaelneale Michael Neale
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: