Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
jenkins 是否有任何 API 可用于获取由“设置构建名称”设置的特定作业的所有构建自定义标签?如果可以通过一些编程脚本来获取这些自定义构建标签列表,如果 API 不可用,请分享这些想法。
build-name-setter-plugin 更改 AbstractBuild 对象的显示名称。您可以做的是获取特定作业的所有构建,并将它们的显示名称与作业的显示名称进行比较。例如:
jenkins = Jenkins.getInstance() job = jenkins.getItem(jobName) blds = job.getBuilds() def result = blds.findAll { it.displayName!=job.displayName} println result