Skip to content

Yet another Jenkins cli tool (I could not find a decent one) written in Nodejs

License

Notifications You must be signed in to change notification settings

htekgulds/jenkins-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jenkins-cli

Yet another Jenkins cli tool (I could not find a decent one) written in Nodejs

Setup

npm run build
npm link

Usage

First connect to Jenkins server (save login info to config file):

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:

# 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...

About

Yet another Jenkins cli tool (I could not find a decent one) written in Nodejs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published