Skip to content

Commit

Permalink
Added hyperlinks to matrix configurations in console output of the
Browse files Browse the repository at this point in the history
parent job. Added German translations.
  • Loading branch information
fredg02 committed Dec 20, 2011
1 parent 3475aec commit f3b8ee0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 7 additions & 6 deletions core/src/main/java/hudson/matrix/MatrixBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package hudson.matrix;

import hudson.Util;
import hudson.console.HyperlinkNote;
import hudson.matrix.listeners.MatrixBuildListener;
import hudson.model.AbstractBuild;
import hudson.model.AbstractProject;
Expand Down Expand Up @@ -292,7 +293,7 @@ protected Result doRun(BuildListener listener) throws Exception {
if(p.isRunSequentially())
scheduleConfigurationBuild(logger, c);
Result buildResult = waitForCompletion(listener, c);
logger.println(Messages.MatrixBuild_Completed(c.getDisplayName(), buildResult));
logger.println(Messages.MatrixBuild_Completed(HyperlinkNote.encodeTo('/'+ c.getUrl(),c.getDisplayName()), buildResult));
r = r.combine(buildResult);
}

Expand All @@ -311,12 +312,12 @@ protected Result doRun(BuildListener listener) throws Exception {
synchronized(q) {// avoid micro-locking in q.cancel.
for (MatrixConfiguration c : activeConfigurations) {
if(q.cancel(c))
logger.println(Messages.MatrixBuild_Cancelled(c.getDisplayName()));
logger.println(Messages.MatrixBuild_Cancelled(HyperlinkNote.encodeTo('/'+ c.getUrl(),c.getDisplayName())));
MatrixRun b = c.getBuildByNumber(n);
if(b!=null) {
Executor exe = b.getExecutor();
if(exe!=null) {
logger.println(Messages.MatrixBuild_Interrupting(b.getDisplayName()));
logger.println(Messages.MatrixBuild_Interrupting(HyperlinkNote.encodeTo('/'+ b.getUrl(),b.getDisplayName())));
exe.interrupt();
}
}
Expand Down Expand Up @@ -364,7 +365,7 @@ private Result waitForCompletion(BuildListener listener, MatrixConfiguration c)
// http://www.nabble.com/Anyone-using-AccuRev-plugin--tt21634577.html#a21671389
// because of this, we really make sure that the build is cancelled by doing this 5
// times over 5 seconds
listener.getLogger().println(Messages.MatrixBuild_AppearsCancelled(c.getDisplayName()));
listener.getLogger().println(Messages.MatrixBuild_AppearsCancelled(HyperlinkNote.encodeTo('/'+ c.getUrl(),c.getDisplayName())));
buildResult = Result.ABORTED;
}

Expand All @@ -379,7 +380,7 @@ private Result waitForCompletion(BuildListener listener, MatrixConfiguration c)
// if the build seems to be stuck in the queue, display why
String why = qi.getWhy();
if(!why.equals(whyInQueue) && System.currentTimeMillis()-startTime>5000) {
listener.getLogger().println(c.getDisplayName()+" is still in the queue: "+why);
listener.getLogger().println(HyperlinkNote.encodeTo('/'+ c.getUrl(),c.getDisplayName())+" is still in the queue: "+why);
whyInQueue = why;
}
}
Expand All @@ -389,7 +390,7 @@ private Result waitForCompletion(BuildListener listener, MatrixConfiguration c)
}

private void scheduleConfigurationBuild(PrintStream logger, MatrixConfiguration c) {
logger.println(Messages.MatrixBuild_Triggering(c.getDisplayName()));
logger.println(Messages.MatrixBuild_Triggering(HyperlinkNote.encodeTo('/'+ c.getUrl(),c.getDisplayName())));
c.scheduleBuild(getAction(ParametersAction.class), new UpstreamCause(MatrixBuild.this));
}

Expand Down
6 changes: 6 additions & 0 deletions core/src/main/resources/hudson/matrix/Messages_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@ MatrixBuild.Triggering=L
MatrixBuild.AppearsCancelled={0} scheint abgebrochen worden zu sein
MatrixBuild.Cancelled={0} abgebrochen
MatrixBuild.Interrupting=Unterbreche {0}
MatrixBuild.Completed={0} beendet mit Ergebnis {1}

MatrixConfiguration.Pronoun=Einstellungen

MatrixRun.KeptBecauseOfParent=Zurückbehalten, weil {0} zurückbehalten wurde.



LabelExpAxis.DisplayName=Labelausdruck
TextArea.DisplayName=Benutzerdefinierte Achse

0 comments on commit f3b8ee0

Please sign in to comment.