lib/util/jenkins.js
function Jenkins(options, log) {
  var parsed = url.parse(options.url);

  if (options.username && options.password) {
    parsed['auth'] = util.format('%s:%s', options.username, options.password);
  }

  this._url = url.format(parsed);
  this._options = options;
  this.log = log || logmagic.local('jenkins');
}
function Jenkins(options, log) {
  var parsed = url.parse(options.url);

  if (options.username && options.password) {
    parsed['auth'] = util.format('%s:%s', options.username, options.password);
  }

  this._url = url.format(parsed);
  this._options = options;
  this.log = log || logmagic.local('jenkins');
}
Jenkins Client.
@constructor
@param {Object} options, including:
url: Jenkins server URL
username, password: Credentials
delay: polling interval in milliseconds
attempts: number of polling attempts to wait for builds to appear
@param {Object} log Optional logging util