mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-16 05:22:22 +00:00
report root causes of UpstreamCause in log an status pages
This commit is contained in:
1 parent
f50316b66a
commit
0626f28965
5 files changed
+22
-3
No files matched your search
+2
-1
@@ -61,7 +61,8 @@ Upcoming changes</a>
|
||||
<li class=bug>
|
||||
“Took…on master” shown for a build which ran on a slave which was since deleted.
|
||||
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-15042">issue 15042</a>)
|
||||
<li class=>
|
||||
<li class=rfe>
|
||||
Report root causes of UpstreamCause in log an status pages.
|
||||
</ul>
|
||||
</div><!--=TRUNK-END=-->
|
||||
|
||||
|
||||
@@ -185,6 +185,10 @@ public abstract class Cause {
|
||||
return upstreamUrl;
|
||||
}
|
||||
|
||||
public List<Cause> getUpstreamCauses() {
|
||||
return upstreamCauses;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getShortDescription() {
|
||||
return Messages.Cause_UpstreamCause_ShortDescription(upstreamProject, upstreamBuild);
|
||||
@@ -197,6 +201,12 @@ public abstract class Cause {
|
||||
ModelHyperlinkNote.encodeTo('/' + upstreamUrl, upstreamProject),
|
||||
ModelHyperlinkNote.encodeTo('/'+upstreamUrl+upstreamBuild, Integer.toString(upstreamBuild)))
|
||||
);
|
||||
if(upstreamCauses != null && upstreamCauses.size() > 0) {
|
||||
listener.getLogger().println(Messages.Cause_UpstreamCause_CausedBy());
|
||||
for (Cause cause : upstreamCauses) {
|
||||
cause.print(listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
|
||||
@@ -28,5 +28,12 @@ THE SOFTWARE.
|
||||
app.getItemByFullName(it.upstreamProject)!=null and
|
||||
app.getItemByFullName(it.upstreamProject).getBuildByNumber(it.upstreamBuild)!=null ?
|
||||
"%started_by_project(it.upstreamProject,it.upstreamBuild.toString(),it.upstreamUrl,rootURL)" :
|
||||
it.shortDescription}'/></span>
|
||||
it.shortDescription}'/>
|
||||
<j:if test="${it.upstreamCauses.size() > 0}">
|
||||
<br /><j:out value="${%caused_by}" />
|
||||
<j:forEach var="c" items="${it.upstreamCauses}">
|
||||
<li><st:include page="description.jelly" it="${c}" /></li>
|
||||
</j:forEach>
|
||||
</j:if>
|
||||
</span>
|
||||
</j:jelly>
|
||||
@@ -21,4 +21,4 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
started_by_project=Started by upstream project <a href="{3}/{2}">{0}</a> build number <a href="{3}/{2}{1}/">{1}</a>
|
||||
|
||||
caused_by=originally caused by:
|
||||
@@ -314,6 +314,7 @@ LoadStatistics.Legends.QueueLength=Queue length
|
||||
|
||||
Cause.LegacyCodeCause.ShortDescription=Legacy code started this job. No cause information is available
|
||||
Cause.UpstreamCause.ShortDescription=Started by upstream project "{0}" build number {1}
|
||||
Cause.UpstreamCause.CausedBy=originally caused by:
|
||||
Cause.UserCause.ShortDescription=Started by user {0}
|
||||
Cause.UserIdCause.ShortDescription=Started by user {0}
|
||||
Cause.RemoteCause.ShortDescription=Started by remote host {0}
|
||||
|
||||
Reference in new issue
Block a user