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

Not executed pipeline stage throws IllegalArgumentException

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      Jenkins 2.89.2
      Delivery Pipeline Plugin 1.1.0
    • Similar Issues:

      Description

      If a stage in a declarative pipeline has status NOT_EXECUTED, the Delivery Pipeline plugin is unable to render the view since the NOT_EXECUTED status is not mapped in se.diabol.jenkins.pipeline.domain.status.StatusType and an IllegalArgumentException is thrown:

      Error while serving https://jenkins/job/Docker/view/my_pipeline/api/json
      java.lang.IllegalArgumentException: No enum constant se.diabol.jenkins.pipeline.domain.status.StatusType.NOT_EXECUTED
          at java.lang.Enum.valueOf(Enum.java:238)
          at se.diabol.jenkins.pipeline.domain.status.StatusType.valueOf(StatusType.java:20)
          at se.diabol.jenkins.workflow.model.WorkflowStatus.statusType(WorkflowStatus.java:44)
          at se.diabol.jenkins.workflow.model.WorkflowStatus.of(WorkflowStatus.java:32)
          at se.diabol.jenkins.workflow.model.Task.resolveStageStatus(Task.java:153)
          at se.diabol.jenkins.workflow.model.Task.resolve(Task.java:126)
          at se.diabol.jenkins.workflow.model.Stage.resolveStageNodes(Stage.java:141)
          at se.diabol.jenkins.workflow.model.Stage.extractStages(Stage.java:124)
          at se.diabol.jenkins.workflow.model.Pipeline.resolve(Pipeline.java:120)
          at se.diabol.jenkins.workflow.WorkflowPipelineView.resolvePipeline(WorkflowPipelineView.java:350)
          at se.diabol.jenkins.workflow.WorkflowPipelineView.resolvePipelines(WorkflowPipelineView.java:343)
          at se.diabol.jenkins.workflow.WorkflowPipelineView.getPipelines(WorkflowPipelineView.java:217)
          at org.kohsuke.stapler.export.MethodProperty.getValue(MethodProperty.java:72)

        Attachments

          Activity

          tommysdk Tommy Tynjä created issue -
          Hide
          tommysdk Tommy Tynjä added a comment -

          Proposed solution with reproducing unit test: https://github.com/Diabol/delivery-pipeline-plugin/pull/277

          Show
          tommysdk Tommy Tynjä added a comment - Proposed solution with reproducing unit test: https://github.com/Diabol/delivery-pipeline-plugin/pull/277
          tommysdk Tommy Tynjä made changes -
          Field Original Value New Value
          Status Open [ 1 ] In Progress [ 3 ]
          Hide
          tommysdk Tommy Tynjä added a comment -

          Released in Delivery Pipeline plugin 1.1.1

          Show
          tommysdk Tommy Tynjä added a comment - Released in Delivery Pipeline plugin 1.1.1
          tommysdk Tommy Tynjä made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          tommysdk Tommy Tynjä made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              tommysdk Tommy Tynjä
              Reporter:
              tommysdk Tommy Tynjä
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: