lib/api/jenkins.js
function version(cb) {

  function _cb(err, result, response) {
    if (err) {
      cb(err);
    } else if (response.headers['x-jenkins']) {
      cb(null, response.headers['x-jenkins']);
    } else {
      cb(new Error(text.__('Not a Jenkins server')));
    }
  }
  this.remoteAccessApi.headJenkins(_cb);
}
function version(cb) {

  function _cb(err, result, response) {
    if (err) {
      cb(err);
    } else if (response.headers['x-jenkins']) {
      cb(null, response.headers['x-jenkins']);
    } else {
      cb(new Error(text.__('Not a Jenkins server')));
    }
  }
  this.remoteAccessApi.headJenkins(_cb);
}
function version ( cb ) { function _cb ( err , result , response ) { if ( err ) { cb ( err ) ; } else if ( response . headers [ 'x-jenkins' ] ) { cb ( null , response . headers [ 'x-jenkins' ] ) ; } else { cb ( new Error ( text . __ ( 'Not a Jenkins server' ) ) ) ; } } this . remoteAccessApi . headJenkins ( _cb ) ; }
Retrieve Jenkins version number from x-jenkins header.
If x-jenkins header does not exist, then it's assumed that the server is not a Jenkins instance.

@param {Function} cb: standard cb(err, result) callback
Retrieve Jenkins version number from x - jenkins header . If x - jenkins header does not exist then it s assumed that the server is not a Jenkins instance .