lib/cli/job.js
function _console(cb) {
  return function (name, buildNumber, args) {

    if (!args) {
      args = buildNumber;
      buildNumber = null;
    }

    function jenkinsCb(jenkins) {
      // console does not trigger any build, interval is set to 0 (no-pending delay time)
      var interval = 0;

      var stream = jenkins.streamJobConsole(name, buildNumber, interval, cli.exit);
      stream.pipe(process.stdout, { end: false });
    }
    cb(args, jenkinsCb);
  };
}
function _console(cb) {
  return function (name, buildNumber, args) {

    if (!args) {
      args = buildNumber;
      buildNumber = null;
    }

    function jenkinsCb(jenkins) {
      // console does not trigger any build, interval is set to 0 (no-pending delay time)
      var interval = 0;

      var stream = jenkins.streamJobConsole(name, buildNumber, interval, cli.exit);
      stream.pipe(process.stdout, { end: false });
    }
    cb(args, jenkinsCb);
  };
}
function _console ( cb ) { return function ( name , buildNumber , args ) { if ( ! args ) { args = buildNumber ; buildNumber = null ; } function jenkinsCb ( jenkins ) { // console does not trigger any build, interval is set to 0 (no-pending delay time) var interval = 0 ; var stream = jenkins . streamJobConsole ( name , buildNumber , interval , cli . exit ) ; stream . pipe ( process . stdout , { end : false } ) ; } cb ( args , jenkinsCb ) ; } ; }
Get a handler that calls Jenkins API to stream console output.

@param {Function} cb: callback for argument handling
@return Jenkins API handler function
Get a handler that calls Jenkins API to stream console output .