Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get stage result or stage console output for a declarative pipeline? #813

Open
solarjoe opened this issue Jul 8, 2021 · 1 comment

Comments

@solarjoe
Copy link

solarjoe commented Jul 8, 2021

ISSUE TYPE
  • How to...
Jenkinsapi VERSION

0.3.11

Jenkins VERSION

2.190.1

SUMMARY

I would like to pass feedback from our (declarative) pipeline to the publisher of a pull request,
especially if and maybe where the pipeline failed.
Is there a way to access the stage result or stage console output.

You could parse this out of the console output, but maybe there is a better way.

@solarjoe
Copy link
Author

solarjoe commented Jul 9, 2021

I think I found a solution.

The plugin Pipeline Stage View Plugin https://plugins.jenkins.io/pipeline-rest-api/ seems to be installed out-of-the-box for current Jenkins installations.

And it provides endpoints that are not used in jenkinsapi so far:

https://github.com/jenkinsci/pipeline-stage-view-plugin/tree/master/rest-api#get-jobjob-namewfapiruns

https://stackoverflow.com/a/38876067/7919597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant