mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-28 12:05:19 +00:00
Display Console Output on the build page (behind an experimental flag) (#10115)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
This commit is contained in:
1 parent
b6e58331ed
commit
331c7685ca
13 files changed
+282
-82
No files matched your search
@@ -143,6 +143,7 @@ import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
import java.util.SortedMap;
|
||||
import java.util.TimeZone;
|
||||
@@ -158,6 +159,7 @@ import java.util.logging.SimpleFormatter;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import jenkins.console.ConsoleUrlProvider;
|
||||
import jenkins.console.DefaultConsoleUrlProvider;
|
||||
import jenkins.console.WithConsoleUrl;
|
||||
import jenkins.model.GlobalConfiguration;
|
||||
import jenkins.model.GlobalConfigurationCategory;
|
||||
@@ -1993,6 +1995,14 @@ public class Functions {
|
||||
return consoleUrl != null ? Stapler.getCurrentRequest().getContextPath() + '/' + consoleUrl : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param run the run
|
||||
* @return the Console Provider for the given run, if null, the default Console Provider
|
||||
*/
|
||||
public static ConsoleUrlProvider getConsoleProviderFor(Run<?, ?> run) {
|
||||
return Optional.ofNullable(ConsoleUrlProvider.getProvider(run)).orElse(new DefaultConsoleUrlProvider());
|
||||
}
|
||||
|
||||
/**
|
||||
* Escapes the character unsafe for e-mail address.
|
||||
* See <a href="https://en.wikipedia.org/wiki/Email_address">the Wikipedia page</a> for the details,
|
||||
|
||||
Reference in new issue
Block a user