Search code examples
jenkinsjenkins-pipelinejenkins-pluginsjenkins-blueocean

Jenkins Blue Ocean Plugin to show the node the stage ran on


Right now, i have no idea which node the stage was run on unless i create a step to execute hostname. its cumbersome

enter image description here

Is there way to see which node the Stage ran on?


Solution

  • You can also use ${env.NODE_NAME}, don't need to exec hostname.

    With a scripted pipeline at least, there's no guaranteed one-to-one relationship between a node and a stage. You can actually have stages that work on multiple nodes, sequentially, or even in parallel. So I doubt you can find a plugin that will render the pipeline in BO with that piece of information.

    You could always print out (echo) the node name as the first step of your stage, so that it shows readily in the BO log at the bottom. Possibly, you could even extend the stage command with a wrapper dsl command myStage that prints that out first thing as well (so DRY). That custom dsl command could also set (prefix or suffix) your stage name with the node name.