{"_id":"l-jenkins","_rev":"3-f8080ec4b335a58f8c9cc3eabc125788","name":"l-jenkins","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"l-jenkins","version":"1.0.0","description":"async jenkins api client","main":"index.js","directories":{"example":"example","lib":"lib","test":"test"},"dependencies":{"request":"^2.88.0","request-promise-native":"^1.0.5","sinon":"^6.3.4"},"devDependencies":{"mocha":"^5.2.0"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/zhulinwei/jenkins_api.git"},"keywords":["async","jenkins","node","javascript"],"author":{"name":"Level.Z"},"license":"ISC","bugs":{"url":"https://github.com/zhulinwei/jenkins_api/issues"},"homepage":"https://github.com/zhulinwei/jenkins_api#readme","gitHead":"74a5e42c9fb403d30f1ef30ba6465d094fb0cdc1","_id":"l-jenkins@1.0.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"zhulinwei","email":"1171567018@qq.com"},"dist":{"integrity":"sha512-b/ybpX+Sxeg9Ms9NKT4GQ1/eJROj57fvYntXjJDJPDUUzDX00GYERhw80rahSwrA2+2kUzU0OFlm1zvdSeqwAQ==","shasum":"ae14dbb4cf9d3fc5d1af027afeedbc875f306633","tarball":"https://registry.npmjs.org/l-jenkins/-/l-jenkins-1.0.0.tgz","fileCount":9,"unpackedSize":13755,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwGHfCRA9TVsSAnZWagAAGi4P/1Ou6gAyOKqmKUF40w+S\nde5Eou4jObqvWPtBwsomtdQQdJTQl3lm+b382es5DpQMNY8Fpc+PTd+ysJ6E\nluYiwXOzH9tjo7B6d5OwzUCQm4aJbQhIuKl3zvD7h01uNTF09r8bqEKh1z1Y\n13MIy2td4b9idBAdw5qrgpGwEBS98CDn10XOQ/A9VBB40jZUGBMoMqcu1255\nB8c/sMVwm6xQVLHww1NaxcfK/rP5zFrNjMulG4oGzalMEuMnP+Nl1vxGnXFW\nohIytPNLMrrv2pjY++1B/EyWyRIW20z2CdTow4xgs9H81ZxoDrCrLtI3f2LX\nBk7i7M5CrUa4VNofmF92mwTQaSnUdi9GwNAmjwCoSNHDm0pTNOPgcgrqcDpW\nN6nmCjUpOsPqOoo/xdwEXNkTxbMnmadRkxj6BLqelQputDbShO0ZNGtWz3jQ\ncyBOcQqpV9niW3it2TQCTduJgB6GCmm+fCnthFagXHi1qgrJ8CbgbT6eolBS\nMyDiuMy+9pX8jpGZ1TVIjbf2pbS3DYNKvCpmv9ZIXHnrP6MIfCGaQ2QdLOLx\ndnTi4bxN/WGxeC+ZVWDtjRs52oteSs+WwFeDg6GNCya9N57uGSxhGD3CccLa\nnvyyyLXbT0rAswZFcphFlhnfibhI2RBeBIKxji31B2x7x+QOLAoU8ff6XA9N\nChnt\r\n=FVi9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICLp+Lcr0eZtrJLSfkE5chjHpUwSYV5DmvpGJkHpOA2jAiEA2tAcBuPpls3gKq5uTz8q/Ih6kGtVkB8EnCKwtHKMCZQ="}]},"maintainers":[{"name":"zhulinwei","email":"1171567018@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/l-jenkins_1.0.0_1539334622762_0.07659541734969388"},"_hasShrinkwrap":false},"1.0.1":{"name":"l-jenkins","version":"1.0.1","description":"async jenkins api client","main":"index.js","directories":{"example":"example","lib":"lib","test":"test"},"dependencies":{"request":"^2.88.0","request-promise-native":"^1.0.5","sinon":"^6.3.4"},"devDependencies":{"mocha":"^5.2.0"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/zhulinwei/jenkins_api.git"},"keywords":["async","jenkins","node","javascript"],"author":{"name":"Level.Z"},"license":"ISC","bugs":{"url":"https://github.com/zhulinwei/jenkins_api/issues"},"homepage":"https://github.com/zhulinwei/jenkins_api#readme","gitHead":"6b8a14a904c28a94a1acce19d4a2fdf20ef58ee4","_id":"l-jenkins@1.0.1","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"zhulinwei","email":"1171567018@qq.com"},"dist":{"integrity":"sha512-bGNcvw92idwypKI5cOIdfkBkYtE1wjeQcwTWEjlCOz0qUystyOP3Tx6u8dsGO5ZJ767yjzy5HFB7boQFhnBaKQ==","shasum":"a4467707ee69f205fae869464ecde6b6ad465367","tarball":"https://registry.npmjs.org/l-jenkins/-/l-jenkins-1.0.1.tgz","fileCount":7,"unpackedSize":14530,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwbTFCRA9TVsSAnZWagAA81YQAKKB5NerjPa3+6Mjzny4\nz1TLZHwQXT1SCg4Lbm9dmRZGISBlZl8H/cuDfskr43op2CK7aFM4Fl7PmPTl\ntnfC8TMRFDm17RldkGAWOVwqfgtt4kee2fOiT8rJ8pD59NO6H5jIcM5FSkg1\n+dtVriJYMfaiz5lt8mpocrBAMwPB79+KjLT+m++Hy2G/IhaU223vDINQXl5u\nFS5lB+qXvVncSVo+zLRtBxbXlEU3rysIdIeSg2zFdEYPMvhrj5FGiS1cuYx9\nOpu+YnIzPkIN0RwlGXRpy9Y6VoP1A5RFsxwhtqgg3xMvOSTul30gLBaWKpmV\nG1ag+EnK/jmqJeVlucLnVtZwbazBfsO0nJjBxhHehH7gNAhYqjmmhNPi/r5y\nxSh2FBPUfITv3jnGNwmTV9F8CU/EzwKr4iAY/l/mV8iHD8mLne0nvxW/AwUd\nXSwgUH8moIvudi2QnO/4ydNEagXJB/RSkDjiXQofpnPHLPKWD+WOeMNUS2l7\ncCGKn6p2jy7S+GNuQ9X3/x3R+ZA28INkIHl/DTFbNWEs8hW3I/I+p5QQqdlU\nkaRFsyEcmRFdnlDtpYawsPh7CU4OpmcsbrgHD3Q5KMFTSPxTmvyStvmNl3A+\nvZ0fn6ebAAQCdweMORWjIq3k6vTJY46K7J7i5Pt2nUy3hY9UJ1FCvi1woZqV\nKwNV\r\n=qB+L\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQYnNgYInX7VAFp82lttY6rRG+GNfG+o8HbNBdwimOvQIgKi6Qc3DjLKqxbLrDKGswfaCnjQ39MY5Q8mH7SKngg+A="}]},"maintainers":[{"name":"zhulinwei","email":"1171567018@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/l-jenkins_1.0.1_1539421380171_0.5065931446773337"},"_hasShrinkwrap":false},"1.0.2":{"name":"l-jenkins","version":"1.0.2","description":"async jenkins api client","main":"index.js","directories":{"example":"example","lib":"lib","test":"test"},"dependencies":{"request":"^2.88.0","request-promise-native":"^1.0.5","sinon":"^6.3.4"},"devDependencies":{"mocha":"^5.2.0"},"scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/zhulinwei/jenkins_api.git"},"keywords":["async","jenkins","node","javascript"],"author":{"name":"Level.Z"},"license":"ISC","bugs":{"url":"https://github.com/zhulinwei/jenkins_api/issues"},"homepage":"https://github.com/zhulinwei/jenkins_api#readme","gitHead":"71025a0bbf1f2bada0dc547417e60da15ca6cc47","_id":"l-jenkins@1.0.2","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"zhulinwei","email":"1171567018@qq.com"},"dist":{"integrity":"sha512-Cla1AS0vrPe6BkiNMaWjqJc54cKrLb2PSDmLGoEZI0pvtCiiQ1ixLcUfDVFh7od9aEk34Y4FPhvPeIbcS3NAIA==","shasum":"f03b16a788cf63e8a6850c63cbdde7f4b70aa36c","tarball":"https://registry.npmjs.org/l-jenkins/-/l-jenkins-1.0.2.tgz","fileCount":7,"unpackedSize":14740,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbw/GxCRA9TVsSAnZWagAAI1wP/0cumjhkpJWVwWzw9eO2\nTT/b1qJfMJXPPUDt9UaRe152GpGRYZaz4sfkx4PNdLA7Emlnfapil9J8L5j4\nB2QAOKpUkiW2pQpF+1Q0AL20vIZDQI7lZLRfG5PStmqQhRGNUE4bsUxtLXvM\nPwPt7abhDLM21tqcm5F+LV55B6IwCGYdPT/qVp4wAj+Z7GRdafnc0D3tI416\n6mmcXFwa7NfDYZ3DxX/G5b4YxkxO6Sppt9/TJ1+XRnT16E0N6K6w6TxF/N58\nDLDjdQqKQ1lP3VS0TNNoyPGYZheyPpKo3cjXWVTiaA6CxZvIpOJwDgvdYyzC\nigaHMuqOWEeWVkyiv1Ai1ywF+FW6pojIwjU2UnB3rzPJc1z/e/EENcDAd0ld\nOJUzmmXdls+ns6RyPyC1BlwX4QdIXM7te+lryQ67wNsTHaQ8kGEzuOGYknjY\nWPRSY/oX6l5lQWaVn5IzNucc8SibG49XZAIVepR7m6xIOB+MB2pv5k/yqZEg\nCmMNhHJw5o+Gt407kT/sLjbZwQISqvD/XDNYMLK5vtrkSC14hsYg6wlsIC5V\nCk9+Ol1zzikodIMpLijNQ5THZ8nfSh1u9Rzh1dDx+EZ0npRrhW76iG0N4ZZ6\npVMOmz3GWhv0j4d3POwppTAhHBWnJXWi6vfmKFEHVpocKy9vtjzR6M7hrsem\n0cMK\r\n=hoTV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE7sUTVQDLSUmkmy8kn4AWWr3hClGdJ5+HE911b9xAZSAiBStMw5+tZ6IzBnqPH5fIbO/SJVXVV7+xyUhSmUYCYP9g=="}]},"maintainers":[{"name":"zhulinwei","email":"1171567018@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/l-jenkins_1.0.2_1539568049035_0.6325137203803954"},"_hasShrinkwrap":false}},"time":{"created":"2018-10-12T08:57:02.761Z","1.0.0":"2018-10-12T08:57:02.897Z","modified":"2022-05-07T14:02:56.068Z","1.0.1":"2018-10-13T09:03:00.635Z","1.0.2":"2018-10-15T01:47:29.237Z"},"maintainers":[{"name":"zhulinwei","email":"1171567018@qq.com"}],"description":"async jenkins api client","homepage":"https://github.com/zhulinwei/jenkins_api#readme","keywords":["async","jenkins","node","javascript"],"repository":{"type":"git","url":"git+https://github.com/zhulinwei/jenkins_api.git"},"author":{"name":"Level.Z"},"bugs":{"url":"https://github.com/zhulinwei/jenkins_api/issues"},"license":"ISC","readme":"# l-jenkins\nUse JavaScript to call Jenkins API\n\n## Install\nnpm install l-jenkins\n\n## Usage\n\n#### Setup\n```javascript\nconst Jenkins = require('l-jenkins');\nconst jenkins = new Jenkins({\n  url: 'your_jenkins_url',\n  token:  'your_jenkins_token',\n  username: 'your_jenkins_username',\n  password: 'your_jenkins_password' \n});\n```\n### jobs\n\n#### create job\n\n``` \nconst result = await jenkins.createJob(your_job_name, 'xmlConfigString');\n```\n\n#### remove job\n\n``` \nconst result = await jenkins.removeJob(your_job_name);\n```\n\n### build\n\n#### build by default jenkins service\n\n``` \nconst result = await jenkins.build(your_job_name);\n```\n\n#### build with params by default jenkins service\n\n``` \nconst options = { param1: 'value1', parameter2: 'value2'};\nconst result = await jenkins.buildWithParams(your_job_name, options);\n```\n\n#### build by blueocean service \n\n``` \nconst options = { param1: 'value1', parameter2: 'value2'};\nconst result = await jenkins.buildByBlueOcean(your_job_name, options);\n```\n\nthe different between blueocean service and default jenkins service is that using blueocean service can got build number immediately, and the default jenkins service can only got queueId,\nif you use the default jenkins to build your job, you should use queueId to got build number, and then got the build info of your job;\n\n### queue info\n\n``` \nconst result = await jenkins.getQueueInfo(queueId);\n```\n#### build info\n\n``` \nconst result = await jenkins.getBuildInfo(your_job_name, build_number);\n```\n\n#### build log\n\n``` \nconst result = await jenkins.getBuildLog(your_job_name, build_number);\n```\n\n#### build history\n\n``` \nconst result = await jenkins.getBuildHistory(your_job_name);\n```\n\n#### stop build \n\n``` \nconst result = await jenkins.stopBuild(your_job_name, build_number);\n```\n\n","readmeFilename":"README.md"}