Tabnine Logo
StreamTaskListener.fromStdout
Code IndexAdd Tabnine to your IDE (free)

How to use
fromStdout
method
in
hudson.util.StreamTaskListener

Best Java code snippets using hudson.util.StreamTaskListener.fromStdout (Showing top 20 results out of 315)

origin: org.jvnet.hudson.main/hudson-test-framework

/**
 * Creates {@link LocalLauncher}. Useful for launching processes.
 */
protected LocalLauncher createLocalLauncher() {
  return new LocalLauncher(StreamTaskListener.fromStdout());
}
origin: jenkinsci/jenkins-test-harness

/**
 * Creates {@link hudson.Launcher.LocalLauncher}. Useful for launching processes.
 */
public Launcher.LocalLauncher createLocalLauncher() {
  return new Launcher.LocalLauncher(StreamTaskListener.fromStdout());
}
origin: org.eclipse.hudson/hudson-test-framework

/**
 * Creates {@link LocalLauncher}. Useful for launching processes.
 */
protected LocalLauncher createLocalLauncher() {
  return new LocalLauncher(StreamTaskListener.fromStdout());
}
origin: io.jenkins.jenkinsfile-runner/setup

/**
 * Creates {@link hudson.Launcher.LocalLauncher}. Useful for launching processes.
 */
public Launcher.LocalLauncher createLocalLauncher() {
  return new Launcher.LocalLauncher(StreamTaskListener.fromStdout());
}
origin: jenkinsci/jenkinsfile-runner

/**
 * Creates {@link hudson.Launcher.LocalLauncher}. Useful for launching processes.
 */
public Launcher.LocalLauncher createLocalLauncher() {
  return new Launcher.LocalLauncher(StreamTaskListener.fromStdout());
}
origin: org.jvnet.hudson.main/hudson-test-harness

/**
 * Creates {@link LocalLauncher}. Useful for launching processes.
 */
protected LocalLauncher createLocalLauncher() {
  return new LocalLauncher(StreamTaskListener.fromStdout());
}
origin: jenkinsci/jenkins-test-harness

/**
 * Creates {@link LocalLauncher}. Useful for launching processes.
 */
protected LocalLauncher createLocalLauncher() {
  return new LocalLauncher(StreamTaskListener.fromStdout());
}
origin: org.hudsonci.plugins/downstream-ext

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();
  }
}

origin: blackboard/jmh-jenkins

public BenchmarkBuildActionDisplay getBuildActionDisplay()
{
 BenchmarkBuildActionDisplay buildDisplay = null;
 WeakReference<BenchmarkBuildActionDisplay> wr = _buildActionDisplay;
 if ( wr != null )
 {
  buildDisplay = wr.get();
  if ( buildDisplay != null )
   return buildDisplay;
 }
 buildDisplay = new BenchmarkBuildActionDisplay( this, StreamTaskListener.fromStdout(), _decimalPlaces );
 _buildActionDisplay = new WeakReference<BenchmarkBuildActionDisplay>( buildDisplay );
 return buildDisplay;
}
origin: org.eclipse.hudson/hudson-core

  public void run() {
    try {
      StreamTaskListener task = StreamTaskListener.fromStdout();
      int r = runElevated(slaveExe, "start", task, dir, nativeUtils);
      task.getLogger().println(r == 0 ? "Successfully started" : "start service failed. Exit code=" + r);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }
});
origin: org.jenkins-ci.modules/windows-slave-installer

  @Override
  public void run() {
    try {
      StreamTaskListener task = StreamTaskListener.fromStdout();
      int r = runElevated(agentExe, "start", task, rootDir);
      task.getLogger().println(r == 0 ? "Successfully started" : "Start service failed. Exit code=" + r);
    } catch (IOException | InterruptedException ex) {
      // Level is severe, because the process won't be recovered in the service mode
      LOGGER.log(Level.SEVERE, "Failed to start the service with id=" + serviceId, ex);
    }
  }
}
origin: org.jvnet.hudson.main/hudson-core

  public void run() {
    try {
      StreamTaskListener task = StreamTaskListener.fromStdout();
      int r = runElevated(slaveExe,"start",task,dir);
      task.getLogger().println(r==0?"Successfully started":"start service failed. Exit code="+r);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }
});
origin: hudson/hudson-2.x

  public void run() {
    try {
      StreamTaskListener task = StreamTaskListener.fromStdout();
      int r = runElevated(slaveExe,"start",task,dir);
      task.getLogger().println(r==0?"Successfully started":"start service failed. Exit code="+r);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }
});
origin: org.eclipse.hudson.main/hudson-core

  public void run() {
    try {
      StreamTaskListener task = StreamTaskListener.fromStdout();
      int r = runElevated(slaveExe,"start",task,dir);
      task.getLogger().println(r==0?"Successfully started":"start service failed. Exit code="+r);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
  }
});
origin: jenkinsci/jclouds-plugin

  public Node call() throws Exception {
    // TODO: record the output somewhere
    JCloudsSlave jcloudsSlave = template.provisionSlave(StreamTaskListener.fromStdout(), provisioningId);
    Jenkins.getInstance().addNode(jcloudsSlave);
    /* Cloud instances may have a long init script. If we declare the provisioning complete by returning
      without the connect operation, NodeProvisioner may decide that it still wants one more instance,
      because it sees that (1) all the slaves are offline (because it's still being launched) and (2)
      there's no capacity provisioned yet. Deferring the completion of provisioning until the launch goes
      successful prevents this problem.  */
    ensureLaunched(jcloudsSlave);
    return jcloudsSlave;
  }
})));
origin: jenkinsci/subversion-plugin

@Issue("JENKINS-16533")
@Test
public void pollingRespectExternalsWithRevision() throws Exception {
  // trunk has svn:externals="-r 1 ^/vendor vendor" (pinned)
  // latest commit on vendor is r3 (> r1)
  File repo = new CopyExisting(getClass().getResource("JENKINS-16533.zip")).allocate();
  SubversionSCM scm = new SubversionSCM("file://" + repo.toURI().toURL().getPath() + "trunk");
  // pinned externals should be recorded with ::p in revisions.txt
  FreeStyleProject p = r.createFreeStyleProject();
  p.setScm(scm);
  p.setAssignedLabel(r.createSlave().getSelfLabel());
  r.assertBuildStatusSuccess(p.scheduleBuild2(0).get());
  // should not find any change (pinned externals should be skipped on poll)
  // fail if it checks the revision of external URL larger than the pinned revision
  assertFalse(p.poll(StreamTaskListener.fromStdout()).hasChanges());
}
origin: jenkinsci/subversion-plugin

public static void checkForSvnServe() throws InterruptedException {
  LocalLauncher launcher = new LocalLauncher(StreamTaskListener.fromStdout());
  try {
    launcher.launch().cmds("svnserve","--help").start().join();
  } catch (IOException e) {
    // TODO better to add a docker-fixtures test dep so CI builds can run these tests
    throw new AssumptionViolatedException("svnserve apparently not installed", e);
  }
}
origin: jenkinsci/subversion-plugin

  /**
   * Do the polling on the slave and make sure it works.
   */
  @Issue("JENKINS-4299")
  @Test
  public void polling() throws Exception {
//        SLAVE_DEBUG_PORT = 8001;
    File repo = new CopyExisting(getClass().getResource("two-revisions.zip")).allocate();
    SubversionSCM scm = new SubversionSCM("file://" + repo.toURI().toURL().getPath());

    FreeStyleProject p = r.createFreeStyleProject();
    p.setScm(scm);
    p.setAssignedLabel(r.createSlave().getSelfLabel());
    r.assertBuildStatusSuccess(p.scheduleBuild2(0).get());

    // initial polling on the slave for the code path that doesn't find any change
    assertFalse(p.poll(StreamTaskListener.fromStdout()).hasChanges());

    createCommit(scm, "foo");

    // polling on the slave for the code path that doesn't find any change
    assertTrue(p.poll(StreamTaskListener.fromStdout()).hasChanges());
  }

origin: jenkinsci/subversion-plugin

  private void invokeTestPollingExternalsForFile() throws Exception {
    // trunk has svn:externals="^/vendor/target.txt target.txt"
    File repo = new CopyExisting(getClass().getResource("JENKINS-20165.zip")).allocate();
    String path = "file://" + repo.toURI().toURL().getPath();
    SubversionSCM scm = new SubversionSCM(path + "trunk");

    // first checkout
    FreeStyleProject p = r.createFreeStyleProject();
    p.setScm(scm);
    p.setAssignedLabel(r.createSlave().getSelfLabel());
    r.assertBuildStatusSuccess(p.scheduleBuild2(0).get());

    // update target.txt in vendor
    SubversionSCM vendor = new SubversionSCM(path + "vendor");
    createWorkingCopy(vendor);
    changeFiles("target.txt");
    commitWorkingCopy("update");

    // should detect change
    assertTrue(p.poll(StreamTaskListener.fromStdout()).hasChanges());
  }
}    
origin: jenkinsci/mercurial-plugin

@Test public void smokes() throws Exception {
  MercurialContainer container = docker.create();
  Slave slave = container.createSlave(r);
  TaskListener listener = StreamTaskListener.fromStdout();
  for (MercurialContainer.Version v : MercurialContainer.Version.values()) {
    HgExe hgExe = new HgExe(container.createInstallation(r, v, false, false, false, "", slave), null, slave.createLauncher(listener), slave, listener, new EnvVars());
    assertThat(hgExe.popen(slave.getRootPath(), listener, true, new ArgumentListBuilder("version")), containsString("Mercurial Distributed SCM (version " + v.exactVersion + ")"));
  }
}
hudson.utilStreamTaskListenerfromStdout

Popular methods of StreamTaskListener

  • <init>
  • getLogger
  • closeQuietly
    Closes this listener and swallows any exceptions, if raised.
  • error
  • close
  • fatalError
  • _error
  • annotate
  • fromStderr
  • asPath

Popular in Java

  • Updating database using SQL prepared statement
  • putExtra (Intent)
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • JTable (javax.swing)
  • Join (org.hibernate.mapping)
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now