提交 c8d7019c 编写于 作者: J Jesse Glick

Moving summary of test results in the proper jobMain of project actions.

Note that this will temporarily cause double display in MavenModuleSet and similar,
until these are fixed to depend on 1.575+ and not do custom display.
上级 26aad627
......@@ -30,8 +30,10 @@ import hudson.Extension;
import hudson.Launcher;
import hudson.Util;
import static hudson.Util.fixNull;
import hudson.model.Action;
import hudson.model.BuildListener;
import hudson.model.Fingerprint.RangeSet;
import hudson.model.InvisibleAction;
import hudson.model.ItemGroup;
import jenkins.model.Jenkins;
import hudson.model.Item;
......@@ -57,6 +59,8 @@ import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.annotation.CheckForNull;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
* Aggregates downstream test reports into a single consolidated report,
......@@ -96,6 +100,10 @@ public class AggregatedTestResultPublisher extends Recorder {
return BuildStepMonitor.NONE;
}
@Override public Collection<? extends Action> getProjectActions(AbstractProject<?, ?> project) {
return Collections.singleton(new TestResultProjectAction(project));
}
/**
* Action that serves the aggregated record.
*
......@@ -359,4 +367,12 @@ public class AggregatedTestResultPublisher extends Recorder {
}
}
@Restricted(NoExternalUse.class)
public static final class TestResultProjectAction extends InvisibleAction {
public final AbstractProject<?, ?> project;
private TestResultProjectAction(AbstractProject<?,?> project) {
this.project = project;
}
}
}
......@@ -51,27 +51,6 @@ THE SOFTWARE.
${%Recent Changes}
</t:summary>
<j:set var="tr" value="${it.lastCompletedBuild.testResultAction}"/>
<j:if test="${tr!=null}">
<j:if test="${tr.class.name != 'hudson.tasks.test.AggregatedTestResultPublisher$TestResultAction'}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${tr.urlName}/" class="model-link inside">${%Latest Test Result}</a>
<t:test-result it="${tr}" />
</t:summary>
</j:if>
</j:if>
<j:forEach var="atr" items="${it.lastCompletedBuild.allActions}">
<j:if test="${atr!=null}">
<j:if test="${atr.class.name == 'hudson.tasks.test.AggregatedTestResultPublisher$TestResultAction'}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${atr.urlName}/" class="model-link inside">${%Latest Aggregated Test Result}</a>
<t:test-result it="${atr}" />
</t:summary>
</j:if>
</j:if>
</j:forEach>
</table>
<!-- merge fragments from the actions -->
......
# This file is under the MIT License by authors
Last\ Successful\ Artifacts=\u0627\u062E\u0631 \u0646\u062C\u0627\u062D
Latest\ Test\ Result=\u0627\u062E\u0631 \u0646\u062A\u064A\u062C\u0629 \u0627\u062E\u062A\u0628\u0627\u0631
Recent\ Changes=\u0627\u062D\u062F\u062B \u0627\u0644\u062A\u0639\u062F\u064A\u0644\u0627\u062A
Workspace=\u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0639\u0645\u0644
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=\u00DAltim Artefacte Correcte
Latest\ Test\ Result=Darrer resultat dels tests
Recent\ Changes=Canvis recents
Workspace=Espai de treball
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Posledn\u00E9 \u00FAsp\u011B\u0161n\u00E9 artefakty
Latest\ Test\ Result=V\u00FDsledky posledn\u00EDho testu
Recent\ Changes=Posledn\u00ED zm\u011Bny
Workspace=Pracovn\u00ED prostor
......@@ -20,7 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
Latest\ Test\ Result=Seneste testresultat
Workspace=Arbejdsomr\u00e5de
Last\ Successful\ Artifacts=Seneste succesfulde artifakter
Recent\ Changes=Nylige \u00E6ndringer
......@@ -23,5 +23,3 @@
Workspace=Arbeitsbereich
Last\ Successful\ Artifacts=Artefakte des letzten erfolgreichen Builds
Recent\ Changes=Letzte \u00C4nderungen
Latest\ Test\ Result=Letztes Testergebnis
Latest\ Aggregated\ Test\ Result=Letzte zusammengefasste Testergebnisse
......@@ -23,5 +23,3 @@
Workspace=Espacio de trabajo
Last\ Successful\ Artifacts=\u00DAltima Ejecuci\u00F3n Exitosa
Recent\ Changes=Cambios recientes
Latest\ Test\ Result=Últimos resultados de tests
Latest\ Aggregated\ Test\ Result=Últimos resultados agregados de tests
# This file is under the MIT License by authors
Last\ Successful\ Artifacts=Viimased \u00F5nnestunud artefaktid
Latest\ Test\ Result=Viimaste testide tulemused
Recent\ Changes=Hiljutised muudatused
Workspace=T\u00F6\u00F6ruum
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Viimeiset onnistuneet tuotokset
Latest\ Test\ Result=Viimeisin testitulos
Recent\ Changes=Viimeaikaiset muutokset
Workspace=Ty\u00F6hakemisto
......@@ -23,5 +23,4 @@
Workspace=Espace de travail
Recent\ Changes=Changements récents
Latest\ Console\ output=Derni\u00E8re sortie de la console
Latest\ Test\ Result=Derniers résultats des tests
Last\ Successful\ Artifacts=Derniers artefacts obtenus avec succès
# This file is under the MIT License by authors
Last\ Successful\ Artifacts=Az utols\u00F3 sikeres eredm\u00E9nyek
Latest\ Test\ Result=A legut\u00F3bbi teszteredm\u00E9nyek
Recent\ Changes=Az ut\u00F3bbi v\u00E1ltoztat\u00E1sok
Workspace=Munkater\u00FClet
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Prodotti dell''ultima build completata con successo
Latest\ Test\ Result=Ultimo Risultato dei Test
Recent\ Changes=Cambiamenti Recenti
Workspace=Spazio di lavoro
......@@ -23,5 +23,3 @@
Workspace=\u30ef\u30fc\u30af\u30b9\u30da\u30fc\u30b9
Recent\ Changes=\u5909\u66f4\u5c65\u6b74
Last\ Successful\ Artifacts=\u6700\u65b0\u6210\u529f\u30d3\u30eb\u30c9\u306e\u6210\u679c\u7269
Latest\ Test\ Result=\u6700\u65b0\u306e\u30c6\u30b9\u30c8\u7d50\u679c
Latest\ Aggregated\ Test\ Result=\u6700\u65b0\u306e\u96c6\u7d04\u3055\u308c\u305f\u30c6\u30b9\u30c8\u7d50\u679c
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=\uCD5C\uADFC \uC131\uACF5\uD55C \uACB0\uACFC\uBB3C\uB4E4
Latest\ Test\ Result=\uAC00\uC7A5 \uCD5C\uADFC \uD14C\uC2A4\uD2B8 \uACB0\uACFC
Recent\ Changes=\uCD5C\uADFC \uBCC0\uACBD\uC0AC\uD56D
Workspace=\uC791\uC5C5 \uACF5\uAC04
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=P\u0113d\u0113jie veiksm\u012Bgie artefakti
Latest\ Test\ Result=P\u0113d\u0113jie testa rezult\u0101ti
Recent\ Changes=Nesen\u0101s izmai\u0146as
Workspace=Darbavirsma
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Siste vellykkede artifakter
Latest\ Test\ Result=Siste testresultater
Recent\ Changes=Nylige endringer
Workspace=Arbeidsomr\u00E5de
......@@ -23,4 +23,3 @@
Workspace=Werkplaats
Last\ Successful\ Artifacts=Laatste succesvol gebouwde producten
Recent\ Changes=Recente wijzigingen
Latest\ Test\ Result=Laatste testresultaten
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Ostatnie Powiedzione Artefakty
Latest\ Test\ Result=Ostatni wynik test\u00F3w
Recent\ Changes=Ostatnie zmiany
Workspace=Obszar roboczy
......@@ -23,4 +23,3 @@
Workspace=Workspace
Last\ Successful\ Artifacts=\u00DAltimos artefatos que obtiveram sucesso
Recent\ Changes=Mudan\u00e7as recentes
Latest\ Test\ Result=\u00daltimo resultado de teste
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Ultimele rezultate corecte
Latest\ Test\ Result=Ultimele rezultate
Recent\ Changes=Schimbari recente
Workspace=Spatiu de lucru
......@@ -23,4 +23,3 @@
Workspace=\u0421\u0431\u043e\u0440\u043e\u0447\u043d\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f
Last\ Successful\ Artifacts=\u0410\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0443\u0434\u0430\u0447\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a
Recent\ Changes=\u041d\u0435\u0434\u0430\u0432\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f
Latest\ Test\ Result=\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=Senaste lyckade artefakter
Latest\ Test\ Result=Senaste testresultat
Recent\ Changes=Senaste f\u00F6r\u00E4ndringar
Workspace=Arbetsyta
......@@ -23,4 +23,3 @@
Workspace=\u00c7al\u0131\u015fma\ Alan\u0131
Last\ Successful\ Artifacts=Son Ba\u015far\u0131l\u0131 Artefaktlar
Recent\ Changes=Son De\u011fi\u015fiklikler
Latest\ Test\ Result=En Son Test Sonu\u00e7lar\u0131
# This file is under the MIT License by authors
Last\ Successful\ Artifacts=\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u0443\u0441\u043F\u0456\u0448\u043D\u0456 \u0437\u0431\u0456\u0440\u043A\u0438
Latest\ Test\ Result=\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u0456\u0445 \u0442\u0435\u0441\u0442\u0456\u0432
Recent\ Changes=\u041E\u0441\u0442\u0430\u043D\u043D\u0456 \u0437\u043C\u0456\u043D\u0438
Workspace=\u0420\u043E\u0431\u043E\u0447\u0438\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433
......@@ -21,6 +21,5 @@
# THE SOFTWARE.
Last\ Successful\ Artifacts=\u6700\u540E\u4E00\u6B21\u6210\u529F\u7684\u6784\u5EFA\u7ED3\u679C
Latest\ Test\ Result=\u6700\u65B0\u6D4B\u8BD5\u7ED3\u679C
Recent\ Changes=\u6700\u65B0\u4FEE\u6539\u8BB0\u5F55
Workspace=\u5DE5\u4F5C\u533A
......@@ -24,5 +24,3 @@
Workspace=\u5de5\u4f5c\u5340
Recent\ Changes=\u6700\u8fd1\u8b8a\u66f4
Last\ Successful\ Artifacts=\u6700\u65b0\u6210\u54c1
Latest\ Test\ Result=\u6700\u65b0\u6e2c\u8a66\u7d50\u679c
Latest\ Aggregated\ Test\ Result=\u6700\u65b0\u5f59\u7e3d\u6e2c\u8a66\u7d50\u679c
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright 2014 Jesse Glick.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:t="/lib/hudson">
<table style="margin-top: 1em; margin-left: 1em;">
<j:set var="atr" value="${it.project.lastCompletedBuild.getAction(it.class.classLoader.loadClass('hudson.tasks.test.AggregatedTestResultPublisher$TestResultAction'))}"/>
<j:if test="${atr != null}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${atr.urlName}/">${%Latest Aggregated Test Result}</a>
<st:nbsp/>
<t:test-result it="${atr}"/>
</t:summary>
</j:if>
</table>
</j:jelly>
Latest\ Aggregated\ Test\ Result=\u6700\u65b0\u306e\u96c6\u7d04\u3055\u308c\u305f\u30c6\u30b9\u30c8\u7d50\u679c
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright 2014 Jesse Glick.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:t="/lib/hudson">
<table style="margin-top: 1em; margin-left: 1em;">
<j:set var="tr" value="${it.project.lastCompletedBuild.getAction(it.class.classLoader.loadClass('hudson.tasks.test.AbstractTestResultAction'))}"/>
<j:if test="${tr != null}">
<t:summary icon="clipboard.png">
<a href="lastCompletedBuild/${tr.urlName}/">${%Latest Test Result}</a>
<st:nbsp/>
<t:test-result it="${tr}"/>
</t:summary>
</j:if>
</table>
</j:jelly>
Latest\ Test\ Result=\u0627\u062E\u0631 \u0646\u062A\u064A\u062C\u0629 \u0627\u062E\u062A\u0628\u0627\u0631
Latest\ Test\ Result=\u6700\u65b0\u306e\u30c6\u30b9\u30c8\u7d50\u679c
Latest\ Test\ Result=\uAC00\uC7A5 \uCD5C\uADFC \uD14C\uC2A4\uD2B8 \uACB0\uACFC
Latest\ Test\ Result=\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0442\u0435\u0441\u0442\u043e\u0432
Latest\ Test\ Result=\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0438 \u043E\u0441\u0442\u0430\u043D\u043D\u0456\u0445 \u0442\u0435\u0441\u0442\u0456\u0432
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册