/** * @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)} */ @Deprecated public EnvVars getEnvironment() throws IOException, InterruptedException { LOGGER.log(WARNING, "deprecated call to Run.getEnvironment\n\tat {0}", new Throwable().getStackTrace()[1]); return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); }
/** * @deprecated as of 1.292 * Use {@link #getEnvironment(TaskListener)} instead. */ @Deprecated public Map<String,String> getEnvVars() { LOGGER.log(WARNING, "deprecated call to Run.getEnvVars\n\tat {0}", new Throwable().getStackTrace()[1]); try { return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); } catch (IOException e) { return new EnvVars(); } catch (InterruptedException e) { return new EnvVars(); } }
for (ComputerListener cl : ComputerListener.all()) { try { cl.onOnline(c, new LogTaskListener(LOGGER, INFO)); } catch (Throwable t) { if (t instanceof Error) {
/** * @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)} */ @Deprecated public EnvVars getEnvironment() throws IOException, InterruptedException { LOGGER.log(WARNING, "deprecated call to Run.getEnvironment\n\tat {0}", new Throwable().getStackTrace()[1]); return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); }
@Deprecated public List<RemoteConfig> getParamExpandedRepos(Run<?, ?> build) throws IOException, InterruptedException { return getParamExpandedRepos(build, new LogTaskListener(LOGGER, Level.INFO)); }
/** * @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)} */ public EnvVars getEnvironment() throws IOException, InterruptedException { return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); }
/** * @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)} */ public EnvVars getEnvironment() throws IOException, InterruptedException { return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); }
/** * @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)} */ public EnvVars getEnvironment() throws IOException, InterruptedException { return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); }
/** * @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)} */ public EnvVars getEnvironment() throws IOException, InterruptedException { return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); }
@Deprecated public String getParamLocalBranch(Run<?, ?> build) throws IOException, InterruptedException { return getParamLocalBranch(build, new LogTaskListener(LOGGER, Level.INFO)); }
public PollRunner(AbstractProject p, Cause cause, List<Action> actions) { this.project = p; this.cause = cause; this.buildActions = actions; // workaround for HUDSON-5406: // some (all?) SCMs require a serializable TaskListener for AbstractProject#pollSCMChanges // LogTaskListener is not serializable (at least not up until Hudson 1.352) TaskListener tl = new LogTaskListener(LOGGER, Level.INFO); if (tl instanceof Serializable) { this.taskListener = tl; } else { this.taskListener = StreamTaskListener.fromStdout(); } }
private @Nonnull PrintStream logger() { TaskListener l; StepContext context = getContext(); try { l = context.get(TaskListener.class); if (l != null) { LOGGER.log(Level.FINEST, "JENKINS-34021: DurableTaskStep.Execution.listener present in {0}", context); } else { LOGGER.log(Level.WARNING, "JENKINS-34021: TaskListener not available upon request in {0}", context); l = new LogTaskListener(LOGGER, Level.FINE); } } catch (Exception x) { LOGGER.log(Level.FINE, "JENKINS-34021: could not get TaskListener in " + context, x); l = new LogTaskListener(LOGGER, Level.FINE); recurrencePeriod = 0; } return l.getLogger(); }
@Deprecated public FlowExecution create(FlowExecutionOwner handle, List<? extends Action> actions) throws IOException { if (Util.isOverridden(FlowDefinition.class, getClass(), "create", FlowExecutionOwner.class, TaskListener.class, List.class)) { try { return create(handle, new LogTaskListener(Logger.getLogger(FlowDefinition.class.getName()), Level.INFO), actions); } catch (IOException x) { throw x; } catch (RuntimeException x) { throw x; } catch (Exception x) { throw new IOException(x); } } else { throw new NoSuchMethodError(); } }
private PrintStream logger() { TaskListener l = null; StepContext context = getContext(); try { l = context.get(TaskListener.class); } catch (Exception x) { LOGGER.log(Level.WARNING, "Failed to find TaskListener in context"); } finally { if (l == null) { l = new LogTaskListener(LOGGER, Level.FINE); } } return l.getLogger(); }
private void updateSymlink(String name, AbstractBuild<?,?> newTarget) throws InterruptedException { if (newTarget != null) newTarget.createSymlink(new LogTaskListener(LOGGER, Level.WARNING), name); else new File(getProject().getBuildDir(), "../"+name).delete(); }
/** * @deprecated as of 1.292 * Use {@link #getEnvironment(TaskListener)} instead. */ @Deprecated public Map<String,String> getEnvVars() { LOGGER.log(WARNING, "deprecated call to Run.getEnvVars\n\tat {0}", new Throwable().getStackTrace()[1]); try { return getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); } catch (IOException e) { return new EnvVars(); } catch (InterruptedException e) { return new EnvVars(); } }
private void updateSymlink(String name, AbstractBuild<?,?> newTarget) throws InterruptedException { if (newTarget != null) newTarget.createSymlink(new LogTaskListener(LOGGER, Level.WARNING), name); else new File(getProject().getBuildDir(), "../"+name).delete(); }
private void updateSymlink(String name, AbstractBuild<?, ?> newTarget) throws InterruptedException { if (newTarget != null) { newTarget.createSymlink(new LogTaskListener(LOGGER, Level.WARNING), name); } else { new File(getProject().getBuildDir(), "../" + name).delete(); } }
private void updateSymlink(String name, AbstractBuild<?,?> newTarget) throws InterruptedException { if (newTarget != null) newTarget.createSymlink(new LogTaskListener(LOGGER, Level.WARNING), name); else new File(getProject().getBuildDir(), "../"+name).delete(); }
@Override public FilePath getModuleRoot(FilePath workspace, AbstractBuild build) { if ( build != null ) { try { EnvVars env = build.getEnvironment(new LogTaskListener(LOGGER, Level.INFO)); return workspace2Repo(workspace, env); } catch (IOException ex) { Logger.getLogger(MercurialSCM.class.getName()).log(Level.SEVERE, null, ex); } catch (InterruptedException ex) { Logger.getLogger(MercurialSCM.class.getName()).log(Level.SEVERE, null, ex); } } EnvVars env = new EnvVars( ); return workspace2Repo(workspace, env); }