opentelemetry-plugin icon indicating copy to clipboard operation
opentelemetry-plugin copied to clipboard

Capture declarative condition post conditions as spans (`always`, `cleanup`, `success`...)

Open v1v opened this issue 4 years ago • 1 comments

Feature Request

Introduce wrapping spans for families of post conditions in declarative pipelines: always, changed, fixed, regression, aborted, success, unstable, unsuccessful, failure, cleanup.

  • https://www.jenkins.io/doc/book/pipeline/syntax/#post-conditions
  • https://www.jenkins.io/doc/pipeline/tour/post/

For instance:

pipeline {
  agent any
  stages {
    stage ('Hello') {
      steps {
        echo "hello World"
      }
    }
  }
  post { 
        always { 
            sh 'echo "always"'
        }
        cleanup {
            sh 'echo "cleanup"'
        }
    }
}

Produces:

image

v1v avatar Mar 21 '21 18:03 v1v

Do you mean that you want to capture refinement under the a "Stage: Declarative: Post Actions" with wrapping spans to identify the "Always" and the "Success" steps?

cyrille-leclerc avatar Mar 24 '21 11:03 cyrille-leclerc

The post action steps does not appear as steps in the pipeline steps so there is no flow-node to capture Screenshot 2023-12-29 at 13 32 05

kuisathaverat avatar Dec 29 '23 12:12 kuisathaverat