jbuilder

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Jbuilder

Jbuilder is a simple command-line utility which just runs any Jenkins job, view will be like this:

terminal demo

Installation

brew tap gocruncher/tap
brew install jb

Quick start

Configure Access to Multiple Jenkins
jb set dev_jenkins --url "https://myjenkins.com" --login admin --token 11aa0926784999dab5  

where the token is available in your personal configuration page of the Jenkins. Click your name on the top right corner on every page, then click "Configure" to see your API token.

In case, when Jenkins is available without authorization:

jb set dev_jenkins --url "https://myjenkins.com"  

or just run the following command in dialog execution mode:

jb set dev_jenkins
Shell autocompletion

As a recommendation, you can enable shell autocompletion for convenient work. To do this, run following:

# for zsh completion:
echo 'source <(jb completion zsh)' >>~/.zshrc

# for bash completion:
echo 'source <(jb completion bash)' >>~/.bashrc

if this does not work for some reason, try following command that might help you to figure out what is wrong:

jb completion check
Usage
# run backend-app job in the current Jenkis 
jb run backend-app  

# run frontend job in the PROD Jenkins
jb -n PROD run frontend

# makes a specific Jenkins name by default
jb use PROD  

Futures

  • cancellation job (Ctrl+C key)
  • resize of the output (just press enter key)
  • output of child jobs

Useful packages

  • cobra - library for creating powerful modern CLI
  • chalk – Terminal string styling done right
  • bar - Flexible ascii progress bar.

Todos

  • add authorization by login/pass and through the RSA key
  • support of a terminal window resizing

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
jb

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL