-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add link to agent a stage is running on to stage summary #495
Conversation
What does this render if the pipeline has |
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks pretty good from a read, one improvement needed and I'll do a re-test when I get a chance
src/main/frontend/pipeline-console-view/pipeline-console/main/StageNodeLink.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link I am currently getting when I click to view the agent is:
http://localhost:8085/jenkins/job/junit-attachments-test/job/master/31/pipeline-console/undefined/computer/(built-in)/
(with undefined in the url) and the link doesn't work
} | ||
|
||
const StageNodeLink = ({agent}: StageNodeLinkProps) => { | ||
const agentName = agent == "built-in" ? "Jenkins" : agent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess jenkins
is also fine. What does the link say? (built-in)
or also jenkins
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem was the capitalize
css class applied to it.
src/main/frontend/pipeline-console-view/pipeline-console/main/StageNodeLink.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks for your work on this!
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