-
Notifications
You must be signed in to change notification settings - Fork 53
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 node labels to Jenkins Pipelines traces #212
Conversation
ff7e01a
to
bcc573d
Compare
|
||
// We want to avoid using Json libraries cause | ||
// may cause incompatibilities on different Jenkins versions. | ||
final StringBuilder sb = new StringBuilder(); |
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.
can there be quotes in Jenkins labels?
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.
If you mean double quotes: no, Jenkins removes the double quotes ("
) when you configure the labels for the worker. Other characters are allowed ('
, $
, %
, etc..)
A valid label array could be:
["arch01","worker","''''asd''''","·$··$·$","asdasdasd"]
@@ -133,6 +133,7 @@ private void completeInformation(final List<BuildPipelineNode> nodes, final Buil | |||
final BuildPipelineNode executableChildNode = searchExecutableChildNode(node); | |||
if(executableChildNode != null) { | |||
node.setPropagatedNodeName(executableChildNode.getNodeName()); | |||
node.setPropagatedNodeLabels(executableChildNode.getNodeLabels()); |
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.
are you propagating it from job spans to stage/pipeline? I guess that's accurate for 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.
Yes, the worker information only is available in an actual executable child node, which is a job
.
Requirements for Contributing to this repository
What does this PR do?
This PR adds the Node Labels to the Jenkins Pipelines traces using the tag
ci.node.labels
.Description of the Change
Alternate Designs
Possible Drawbacks
Verification Process
Additional Notes
Release Notes
Review checklist (to be filled by reviewers)
changelog/
label attached. If applicable it should have thebackward-incompatible
label attached.do-not-merge/
label attached.kind/
andseverity/
labels attached at least.