UNPKG

jenkins-cli-node-js

Version:

node jenkins

103 lines (67 loc) 1.44 kB
# node-jenkins-cli jenkins is operated from the node command line # Installation globally npm i -g node-jenkin-cli # Installation locally npm i -S node-jenkin-cli # Usage ## login ### login in jenkins Options - userName (string) : Jenkins user - password (string) : Jenkins password - host (string) : Jenkins host ## viewList ### Get view list #### Result ```javascript [ { _class: "hudson.model.AllView", name: "前端", url: "http://×××/", }, ]; ``` ## viewItem ### Get view list item Options - viewName (string) : view name #### Result ```javascript { [ { _class: 'hudson.model.AllView', name: 'all', url: 'http://×××/' } ], name: '前端', property: [], url: 'http://×××/view/%E6%B7%B1%E5%9C%B3%E5%89%8D%E7%AB%AF/' } ``` ## publish ### Build task Options - pipelineName (string) : Jenkins pipelineName ## buildList ### Get build list #### Result ```javascript [ { currentExecutable: { _class: "hudson.model.FreeStyleBuild", url: "http://×××/job/pdm-web-2.3.x-publish/275/", }, }, { currentExecutable: null }, ]; ``` ## stopBuild ### stop building Options - pipelineName (string) : Jenkins pipelineName - buildNumber (number) : Jenkins buildNumber