jenkinsci / jenkinsci/parameterized-trigger-plugin

[JENKINS-33834] improve display of subproject builds

Open
#664 1 comment 0 reactions 0 assignees View on GitHub
component:parameterized-trigger-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
77
Forks
174
Avg merge
22h 27m
Merged PRs (30d)
1

Description

At the moment, if user looking at build page in UI, he sees

"Subproject Builds" and then list of builds that were triggered by parametrized trigger plugin.

Unfortunately it shows only builds that are already completed, and no information about blocked in progress jobs.

I understand, this is because of limited availability information done by function

build.getAction(BuildInfoExporterAction.class).getTriggeredBuilds()

It should be possible to show also other triggered builds that are currently "in progress" by something similar to following code below in groovy:

import hudson.plugins.parameterizedtrigger.BuildInfoExporterAction

import hudson.plugins.parameterizedtrigger.SubProjectsAction

bp=Jenkins.instance.getItem("dsl-project_pull-requests")
bd=bp.getBuild("158")
projects = []
bp.transientActions.each { it ->
if (it instanceof hudson.plugins.parameterizedtrigger.SubProjectsAction) {
it.configs.each { cfg ->
projects.addAll(cfg.projects.tokenize(','))
}
}
}
builds = []
projects.each { prj->
be=Jenkins.instance.getItem(prj)
be.getNewBuilds().each { nb ->
nb.getCauses().each { c ->
if ( c instanceof hudson.model.Cause.UpstreamCause) {
if (c.upstreamProject == bp.name && c.upstreamBuild == bd.number) {
builds.add(nb)
}
}
}
}
}
println builds

println bd.getAction(BuildInfoExporterAction.class).getTriggeredBuilds()

PS. sorry, I'm not very good in java programming, otherwise I'd do just pull request to improve

getTriggeredBuilds() in hudson.plugins.parameterizedtrigger.BuildInfoExporterAction directly.

---
Originally reported by kad, imported from: improve display of subproject builds


  • assignee: huybrechts
  • status: Open
  • priority: Minor
  • component(s): parameterized-trigger-plugin
  • resolution: Unresolved
  • votes: 1
  • watchers: 3
  • imported: 2025-12-07

Raw content of original issue

At the moment, if user looking at build page in UI, he sees
"Subproject Builds" and then list of builds that were triggered by parametrized trigger plugin.
Unfortunately it shows only builds that are already completed, and no information about blocked in progress jobs.

I understand, this is because of limited availability information done by function



build.getAction(BuildInfoExporterAction.class).getTriggeredBuilds()


It should be possible to show also other triggered builds that are currently "in progress" by something similar to following code below in groovy:


import hudson.plugins.parameterizedtrigger.BuildInfoExporterAction

import hudson.plugins.parameterizedtrigger.SubProjectsAction

bp=Jenkins.instance.getItem("dsl-project_pull-requests")
bd=bp.getBuild("158")
projects = []
bp.transientActions.each { it ->
if (it instanceof hudson.plugins.parameterizedtrigger.SubProjectsAction) {
it.configs.each { cfg ->
projects.addAll(cfg.projects.tokenize(','))
}
}
}
builds = []
projects.each { prj->
be=Jenkins.instance.getItem(prj)
be.getNewBuilds().each { nb ->
nb.getCauses().each { c ->
if ( c instanceof hudson.model.Cause.UpstreamCause) {
if (c.upstreamProject == bp.name && c.upstreamBuild == bd.number) {
builds.add(nb)
}
}
}
}
}
println builds

println bd.getAction(BuildInfoExporterAction.class).getTriggeredBuilds()


PS. sorry, I'm not very good in java programming, otherwise I'd do just pull request to improve
getTriggeredBuilds() in hudson.plugins.parameterizedtrigger.BuildInfoExporterAction directly.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.