lib/api/job.js
function copy(existingName, newName, cb) {
  var opts = {
    mode: 'copy',
    from: existingName,
    contentType: 'text/plain',
  };
  this.remoteAccessApi.postCreateItem(newName, _.merge(opts, this.opts.headers), cb);
}
function copy(existingName, newName, cb) {
  var opts = {
    mode: 'copy',
    from: existingName,
    contentType: 'text/plain',
  };
  this.remoteAccessApi.postCreateItem(newName, _.merge(opts, this.opts.headers), cb);
}
function copy ( existingName , newName , cb ) { var opts = { mode : 'copy' , from : existingName , contentType : 'text/plain' , } ; this . remoteAccessApi . postCreateItem ( newName , _ . merge ( opts , this . opts . headers ) , cb ) ; }
Copy an existing job into a new job.

@param {String} existingName: existing Jenkins job name to copy from
@param {String} newName: new Jenkins job name to copy to
@param {Function} cb: standard cb(err, result) callback
Copy an existing job into a new job .