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

User can add a new step from the list of available steps and edit it

    • Icon: Story Story
    • Resolution: Fixed
    • Icon: Major Major
    • blueocean-plugin
    • None
    • atlantic, arctic, tasman, frank

      In Scope

      • User clicks "Add Step" and the dialog appears showing a list of steps
      • Clicking "Use Step" adds a the step to the end of the step list
      • User can see the form for the step in the editor
      • List of available steps is driven by the API provided by JENKINS-38584
      • An extension point for a step editor to plug into
      • Implement for at least 2 different steps (so we know what a step editor form looks like)
      • User can click on a step after it has been added and edit contents (via its editor, unless it is "unsupported" type see https://issues.jenkins-ci.org/browse/JENKINS-38590)

      Out of Scope

      • Adding a step which doesn't have an editor (handled in another ticket)

      Some more details:

      A chunk of steps in the model/json looks like this:

      "steps":       [
                      {
                "name": "sh",
                "arguments":           {
                  "value": "cat /usr/local/apache2/conf/extra/httpd-userdir.conf"
                }
              },
                      {
                "name": "sh",
                "arguments":           {            
                  "value": "echo \"The answer is 42\""
                }
              }
            ]
      

      (referring to https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/master/src/test/resources/json/agentDocker.json - details may change a bit).

      Note that each step object has a name (which can be looked up to see if there is an editor for it). In this case it is the most common sh step - the arguments here is a simple object which has a "value" of the script.

      This AST/model is formally defined here: https://github.com/jenkinsci/pipeline-model-definition-plugin/blob/master/src/main/resources/ast-schema.json. This is an example of a "named argument" - there are few ways arguments for steps can be expressed but this is most common (and fairly simple).
      Different steps may have different representations: one of namedArgumentList, positionalArgumentList or singleArgument.

          [JENKINS-38585] User can add a new step from the list of available steps and edit it

          Michael Neale added a comment -

          This is probably the chunkiest ticket, if it makes sense to spin off other ones, we can.

          Michael Neale added a comment - This is probably the chunkiest ticket, if it makes sense to spin off other ones, we can.

          Code changed in jenkins
          User: Keith Zantow
          Path:
          pom.xml
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadata.java
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/1f369b77d2f39baa29fa5db8e26cdfc8c22a378f
          Log:
          Merge pull request #1 from abayer/JENKINS-38585-step-editor

          Move to using DescribableModel and friends.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Keith Zantow Path: pom.xml src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadata.java src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/1f369b77d2f39baa29fa5db8e26cdfc8c22a378f Log: Merge pull request #1 from abayer/ JENKINS-38585 -step-editor Move to using DescribableModel and friends.

          Code changed in jenkins
          User: kzantow
          Path:
          pom.xml
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/d962cd51f8a36b1591cc3e611102bffd7803a54d
          Log:
          Merge remote-tracking branch 'primary/master' into JENKINS-38585-step-editor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: pom.xml http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/d962cd51f8a36b1591cc3e611102bffd7803a54d Log: Merge remote-tracking branch 'primary/master' into JENKINS-38585 -step-editor

          Code changed in jenkins
          User: kzantow
          Path:
          pom.xml
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadata.java
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/4dcbabecbb58997e688bedf2810de11ee27e0da5
          Log:
          Merge branch 'JENKINS-38585-step-editor' of github.com:kzantow/blueocean-pipeline-editor into JENKINS-38585-step-editor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: pom.xml src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadata.java src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/4dcbabecbb58997e688bedf2810de11ee27e0da5 Log: Merge branch ' JENKINS-38585 -step-editor' of github.com:kzantow/blueocean-pipeline-editor into JENKINS-38585 -step-editor

          Code changed in jenkins
          User: Keith Zantow
          Path:
          pom.xml
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java
          src/test/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataServiceTest.java
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/7349001f83b2f8f54e0dbf4614fa07aeb3ac3f7e
          Log:
          Merge pull request #2 from abayer/JENKINS-38585-step-editor

          Add old-school SimpleBuildSteps via Symbols.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Keith Zantow Path: pom.xml src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java src/test/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataServiceTest.java http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/7349001f83b2f8f54e0dbf4614fa07aeb3ac3f7e Log: Merge pull request #2 from abayer/ JENKINS-38585 -step-editor Add old-school SimpleBuildSteps via Symbols.

          Code changed in jenkins
          User: kzantow
          Path:
          pom.xml
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java
          src/test/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataServiceTest.java
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/3ebe7942b165ac7053f800d9634fd69624f39fad
          Log:
          Merge branch 'JENKINS-38585-step-editor' of git@github.com:kzantow/blueocean-pipeline-editor.git into JENKINS-38585-step-editor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: pom.xml src/main/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataService.java src/test/java/io/blueocean/rest/pipeline/editor/PipelineStepMetadataServiceTest.java http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/3ebe7942b165ac7053f800d9634fd69624f39fad Log: Merge branch ' JENKINS-38585 -step-editor' of git@github.com:kzantow/blueocean-pipeline-editor.git into JENKINS-38585 -step-editor

          Code changed in jenkins
          User: kzantow
          Path:
          Jenkinsfile
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/5a1f351d4f47bd53762262c32a7cc3c027e5d01c
          Log:
          Merge remote-tracking branch 'primary/master' into JENKINS-38585-step-editor

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: kzantow Path: Jenkinsfile http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/5a1f351d4f47bd53762262c32a7cc3c027e5d01c Log: Merge remote-tracking branch 'primary/master' into JENKINS-38585 -step-editor

          Code changed in jenkins
          User: Keith Zantow
          Path:
          .gitignore
          Jenkinsfile
          package.json
          pom.xml
          src/main/java/io/blueocean/rest/pipeline/editor/ExportedDescribableModel.java
          src/main/java/io/blueocean/rest/pipeline/editor/ExportedDescribableParameter.java
          src/main/java/io/blueocean/rest/pipeline/editor/ExportedDescribableParameterDecorator.java
          src/main/java/io/blueocean/rest/pipeline/editor/ExportedPipelineFunction.java
          src/main/java/io/blueocean/rest/pipeline/editor/ExportedPipelineStep.java
          src/main/java/io/blueocean/rest/pipeline/editor/PipelineMetadataService.java
          src/main/js/components/EditorDemo.jsx
          src/main/js/components/editor/AddStepSelectionDialog.jsx
          src/main/js/components/editor/EditorMain.jsx
          src/main/js/components/editor/EditorStepDetails.jsx
          src/main/js/components/editor/EditorStepList.jsx
          src/main/js/components/editor/steps/GenericStepEditor.jsx
          src/main/js/components/editor/steps/ShellScriptStepEditor.jsx
          src/main/js/components/editor/steps/properties/BooleanPropertyInput.jsx
          src/main/js/components/editor/steps/properties/DecimalPropertyInput.jsx
          src/main/js/components/editor/steps/properties/IntegerPropertyInput.jsx
          src/main/js/components/editor/steps/properties/StringPropertyInput.jsx
          src/main/js/services/PipelineStepListStore.js
          src/main/less/editor.less
          src/test/java/io/blueocean/rest/pipeline/editor/PipelineMetadataServiceTest.java
          http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/a9af14f833bee9b1dd6fbbe649ad331eea641dda
          Log:
          Merge pull request #3 from kzantow/JENKINS-38585-step-editor

          [WIP JENKINS-38585] pipeline step editor

          Compare: https://github.com/jenkinsci/blueocean-pipeline-editor-plugin/compare/bc3336b8117f...a9af14f833be

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Keith Zantow Path: .gitignore Jenkinsfile package.json pom.xml src/main/java/io/blueocean/rest/pipeline/editor/ExportedDescribableModel.java src/main/java/io/blueocean/rest/pipeline/editor/ExportedDescribableParameter.java src/main/java/io/blueocean/rest/pipeline/editor/ExportedDescribableParameterDecorator.java src/main/java/io/blueocean/rest/pipeline/editor/ExportedPipelineFunction.java src/main/java/io/blueocean/rest/pipeline/editor/ExportedPipelineStep.java src/main/java/io/blueocean/rest/pipeline/editor/PipelineMetadataService.java src/main/js/components/EditorDemo.jsx src/main/js/components/editor/AddStepSelectionDialog.jsx src/main/js/components/editor/EditorMain.jsx src/main/js/components/editor/EditorStepDetails.jsx src/main/js/components/editor/EditorStepList.jsx src/main/js/components/editor/steps/GenericStepEditor.jsx src/main/js/components/editor/steps/ShellScriptStepEditor.jsx src/main/js/components/editor/steps/properties/BooleanPropertyInput.jsx src/main/js/components/editor/steps/properties/DecimalPropertyInput.jsx src/main/js/components/editor/steps/properties/IntegerPropertyInput.jsx src/main/js/components/editor/steps/properties/StringPropertyInput.jsx src/main/js/services/PipelineStepListStore.js src/main/less/editor.less src/test/java/io/blueocean/rest/pipeline/editor/PipelineMetadataServiceTest.java http://jenkins-ci.org/commit/blueocean-pipeline-editor-plugin/a9af14f833bee9b1dd6fbbe649ad331eea641dda Log: Merge pull request #3 from kzantow/ JENKINS-38585 -step-editor [WIP JENKINS-38585] pipeline step editor Compare: https://github.com/jenkinsci/blueocean-pipeline-editor-plugin/compare/bc3336b8117f...a9af14f833be

            kzantow Keith Zantow
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: