Open Hammie opened 3 weeks ago
What does this render if the pipeline has agent none
and there is no agent
for the stage either? We have some pipelines like that, where an agentless stage sets job properties conditionally before the job starts waiting for an available agent.
What does this render if the pipeline has
agent none
and there is noagent
for the stage either? We have some pipelines like that, where an agentless stage sets job properties conditionally before the job starts waiting for an available agent.
Good find, there's a bug it always displays the text when it should only do it if the agent is running on a stage:
I've also been testing it on our production instance, and there are some more edge cases where it is not quite working as expected.
I'll try and fix these and also write some tests for them so we can have some confidence in it working well.
But I'm not an experienced Java dev, so we'll see how that goes...
I've added some tests and fixed the known issues.
Not really happy with the actual agent lookup code, but I don't think I can really do it better.
At the very least the tests should make it easier if someone wants to try and rewrite it.
Adds a line to the console view stage summary, showing which agent the stage is running on.
Fixes #426
Testing done
Ran the plugin on a Jenkins instance with multi-stage pipelines, and so far everything seems to work.
Submitter checklist