How to get stdout and stderr from single Jenkins Pipeline parallel blocks?

前端 未结 2 1420
北荒
北荒 2021-01-18 12:14

I\'m using a parallel block into my Jenkinsfile to execute concurrently some tests, but all the outputs are getting mixed up.

This is an extract of my J

相关标签:
2条回答
  • 2021-01-18 12:25

    On the build page of your job there is a link "Pipeline steps" on the left. There in the tree-like structure you can find all the steps that your job has run including parallel ones. You can go inside of every step and access its console log using the link on the left. Alternatively you can use a "terminal" icon on the right in the same row.

    Click it and you will see the console log which solely produced within that step without any intermixing with other steps running simultaneously. If a step or several parallel steps are still in progress their logs will be dynamically updated on each of their console log pages.

    0 讨论(0)
  • 2021-01-18 12:33

    https://stackoverflow.com/a/58050883/8380249 provides a way to get logs from parallel blocks

    • either as a string in the pipeline code
    • or saved as an artifact of the run

    the library used there also provides accessors to the internal ids which I think could be used to generate links to "pipeline steps" files

    0 讨论(0)
提交回复
热议问题