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

Jenkinsfile schema Java API as WorkflowRun action

      Kyoto has REST API to expose Jenkinsfile schema in JSON format. Pipeline editor in BO needs to call this API and this would needed to be exposed using pipeline API actions so that pipeline editor UI can call it by looking at 'actions' element in pipeline API response.

      As discussed with abayer the schema parsing Java API can be exposed as action on WorkflowAction.

          [JENKINS-38152] Jenkinsfile schema Java API as WorkflowRun action

          Vivek Pandey created issue -

          Michael Neale added a comment -

          I am not sure how this relates to the editor - wont it operate on the JSON model and be passing that around? What am I missing?

          Michael Neale added a comment - I am not sure how this relates to the editor - wont it operate on the JSON model and be passing that around? What am I missing?

          Vivek Pandey added a comment -

          How does editor get the JSON model? My understanding talking to jamesdumay is that editor will get hold of the JSON using this API.

          Vivek Pandey added a comment - How does editor get the JSON model? My understanding talking to jamesdumay is that editor will get hold of the JSON using this API.

          Michael Neale added a comment -

          vivek ok thanks, makes sense.

          Michael Neale added a comment - vivek ok thanks, makes sense.

          Andrew Bayer added a comment -

          So if I remember correctly, what's being looked for here is specifically the stage execution order/info, right? Do we want the synthetic stages too or just the "real" ones?

          Andrew Bayer added a comment - So if I remember correctly, what's being looked for here is specifically the stage execution order/info, right? Do we want the synthetic stages too or just the "real" ones?

          James Dumay added a comment -

          michaelneale vivek the REST endpoint is something we probably want to host under our URL structure at /org/pipelines/My Pipeline/model or something?

          James Dumay added a comment - michaelneale vivek the REST endpoint is something we probably want to host under our URL structure at /org/pipelines/My Pipeline/model or something?

          Sam Van Oort added a comment -

          Do we really need such a complex API just to do ordering? Esp when the new Bismuth APIs will already do ordering, and we already have stage ordering?

          Sam Van Oort added a comment - Do we really need such a complex API just to do ordering? Esp when the new Bismuth APIs will already do ordering, and we already have stage ordering?

          Andrew Bayer added a comment -

          svanoort - what's driving this is Blue Ocean being able to check what stages are going to run but have not run yet. With declarative Pipelines, we can say with certainty what stages/parallel branches are going to be executed in what order from the moment we parse the Jenkinsfile. Hence, this.

          Andrew Bayer added a comment - svanoort - what's driving this is Blue Ocean being able to check what stages are going to run but have not run yet . With declarative Pipelines, we can say with certainty what stages/parallel branches are going to be executed in what order from the moment we parse the Jenkinsfile . Hence, this.

          Sam Van Oort added a comment -

          Okay so that kind of helps make the use case clear, and makes sense now.

          Sam Van Oort added a comment - Okay so that kind of helps make the use case clear, and makes sense now.

          Code changed in jenkins
          User: Andrew Bayer
          Path:
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTAgent.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTBranch.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTBuildCondition.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTElement.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTEnvironment.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTNamedArgumentList.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTNotifications.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPipelineDef.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPositionalArgumentList.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPostBuild.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTSingleArgument.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStages.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStep.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTTools.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTTreeStep.groovy
          src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/Converter.groovy
          src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/actions/ExecutionModelAction.java
          http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f4899b814f15f8dadf153c70f0c3a103f2d757f1
          Log:
          First work on JENKINS-38152 - action/stripped stages

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Andrew Bayer Path: src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/Utils.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTAgent.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTBranch.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTBuildCondition.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTElement.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTEnvironment.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTNamedArgumentList.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTNotifications.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPipelineDef.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPositionalArgumentList.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTPostBuild.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTSingleArgument.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStage.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStages.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTStep.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTTools.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/ast/ModelASTTreeStep.groovy src/main/groovy/org/jenkinsci/plugins/pipeline/modeldefinition/parser/Converter.groovy src/main/java/org/jenkinsci/plugins/pipeline/modeldefinition/actions/ExecutionModelAction.java http://jenkins-ci.org/commit/pipeline-model-definition-plugin/f4899b814f15f8dadf153c70f0c3a103f2d757f1 Log: First work on JENKINS-38152 - action/stripped stages

            abayer Andrew Bayer
            vivek Vivek Pandey
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: