https://github.com/htekgulds/jenkins-cli
Yet another Jenkins cli tool (I could not find a decent one) written in Nodejs
https://github.com/htekgulds/jenkins-cli
cli esbuild jenkins nodejs yargs
Last synced: 4 months ago
JSON representation
Yet another Jenkins cli tool (I could not find a decent one) written in Nodejs
- Host: GitHub
- URL: https://github.com/htekgulds/jenkins-cli
- Owner: htekgulds
- License: mit
- Created: 2024-08-26T12:17:29.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T07:38:39.000Z (almost 2 years ago)
- Last Synced: 2025-03-08T05:12:26.543Z (over 1 year ago)
- Topics: cli, esbuild, jenkins, nodejs, yargs
- Language: JavaScript
- Homepage:
- Size: 177 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jenkins-cli
Yet another Jenkins cli tool (I could not find a decent one) written in Nodejs
## Setup
```sh
npm run build
npm link
```
## Usage
First connect to Jenkins server (save login info to config file):
```sh
jenkins login http://jenkins.mycompany.com
# Username?
# Password?
# Connection successful!
# connection details will be saved into a json config file so other commands can use it
```
Now we can use the commands:
```sh
# List of Jenkins jobs
jenkins job list
# output
┌──────────────────────┬──────────┐
│ Name │ Status │
├──────────────────────┼──────────┤
│ helloworld │ success │
├──────────────────────┼──────────┤
│ another job │ success │
├──────────────────────┼──────────┤
│ what-the-job │ error │
└──────────────────────┴──────────┘
# Status of a single job
jenkins job get helloworld
# output
┌─────┬──────┬───────┬───────┬────────┐
│ Id │ Test │ Build │ Image │ Deploy │
├─────┼──────┼───────┼───────┼────────┤
│ 5 │ 6s │ 3s │ 1m │ 5s │
├─────┼──────┼───────┼───────┼────────┤
│ 4 │ 5s │ 4s │ 53s │ 5s │
├─────┼──────┼───────┼───────┼────────┤
│ 3 │ 5s │ 4s │ 51s │ 4s │
├─────┼──────┼───────┼───────┼────────┤
│ 2 │ 4s │ 4s │ 52s │ 4s │
├─────┼──────┼───────┼───────┼────────┤
│ 1 │ 6s │ 4s │ 47s │ 4s │
└─────┴──────┴───────┴───────┴────────┘
```
*Note: releases coming soon...*