jenkinsci / github-autostatus-plugin

Jenkins plugin to provide automatic status for multibranch jobs
https://plugins.jenkins.io/github-autostatus/
MIT License
52 stars 34 forks source link

Labeled Durable Tasks Reported as Stage #96

Open raymondhoagland opened 4 years ago

raymondhoagland commented 4 years ago

DurableTaskSteps now support labels, but using a label results in a call to FlowNode.addAction causing the plugin to report the step as a stage.

The plugin appears to recognize these steps are not really stages, as the status is set to pending early on but not marked successful/failed until the end of execution which leads me to believe it's getting resolved by the close method.

Because stages can be identified ahead of time for declarative pipelines unlike scripted pipelines, I presume they are unaffected.

jeffpearce commented 4 years ago

@raymondhoagland can you give me a sample pipeline I can test with?

raymondhoagland commented 4 years ago
node('master') {
  stage('Test Autostatus') {
    checkout scm
    sh(script: "echo 'hello'", label: 'echo')
  }
}

should be sufficient to show the issue - 3 statuses are reported for this pipeline

  1. continuous-integration/jenkins/branch - standard status from Jenkins
  2. Test Autostatus - the actual stage
  3. echo - the label of the shell step
jeffpearce commented 4 years ago

Thanks, that will make it easy to fix.

jeffpearce commented 4 years ago

Thanks for the report. Fix upcoming

raymondhoagland commented 4 years ago

Awesome, thanks!

jeffpearce commented 4 years ago

Fix should be in 3.6.2. Let me know if you continue to have issues.