1.0.0 • Published 2 years ago

jenkins-cli-node-js v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

[
  {
    _class: "hudson.model.AllView",
    name: "前端",
    url: "http://×××/",
  },
];

viewItem

Get view list item

Options

  • viewName (string) : view name

Result

{
[
  {
    _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

[
  {
    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

1.0.0

2 years ago