Jenkins pipeline: List agents by name or by label
List agents by name and by label
def jenkins = Jenkins.instance def computers = jenkins.computers computers.each { // println "${it.displayName} ${it.hostName}" } def labels = jenkins.getLabels() labels.each { println "${it.displayName}" }
Published on 2020-07-03
If you have any comments or questions, feel free to post them on the source of this page in GitHub. Source on GitHub.
Comment on this post