src/main.js
function (pluginName, customParams, callback) {
      [pluginName, customParams, callback] = doArgs(arguments, ['string', ['object', {}], 'function']);

      const body = `<jenkins><install plugin="${pluginName}" /></jenkins>`;

      doRequest({
        method: 'POST',
        urlPattern: [INSTALL_PLUGIN],
        request: {
          body: body,
          headers: { 'Content-Type': 'text/xml' }
        },
        noparse: true,
        bodyProp: 'plugins'
      }, customParams, callback);
    }
function (pluginName, customParams, callback) {
      [pluginName, customParams, callback] = doArgs(arguments, ['string', ['object', {}], 'function']);

      const body = `<jenkins><install plugin="${pluginName}" /></jenkins>`;

      doRequest({
        method: 'POST',
        urlPattern: [INSTALL_PLUGIN],
        request: {
          body: body,
          headers: { 'Content-Type': 'text/xml' }
        },
        noparse: true,
        bodyProp: 'plugins'
      }, customParams, callback);
    }
function ( pluginName , customParams , callback ) { [ pluginName , customParams , callback ] = doArgs ( arguments , [ 'string' , [ 'object' , { } ] , 'function' ] ) ; const body = ` ${ pluginName } ` ; doRequest ( { method : 'POST' , urlPattern : [ INSTALL_PLUGIN ] , request : { body : body , headers : { 'Content-Type' : 'text/xml' } } , noparse : true , bodyProp : 'plugins' } , customParams , callback ) ; }
Install a plugin

@param {string} pluginName
@param {object|undefined} customParams is optional
@param {function} callback
Install a plugin