jenkins-cli icon indicating copy to clipboard operation
jenkins-cli copied to clipboard

Simple Jenkins Command Line Interface

Simple Jenkins command line interface written in perl.

USAGE

$ jenkins --help Usage: ./bin/jenkins [options] [command] []

Global Options: --baseuri=: base uri to jenkins server [http://jenkins] --stoplight: make blue builds green [off] --job=: specify a job name, can be repeated --view=: specify a list of jobs by view

Commands: ls|list []: show status of builds, optionally filter on pattern start : start job stop : stop job tail : tail the most recent build log for a job disable : disable job enable : enable a job wipeout : delete current build workspace for a job q|queue: shows pending build queue grouped by build-slaves hist|history: list history of builds for a job conf|config: dump config.xml for a job create <name|pattern> <config.xml|-> : create/update new jenkins job from config.xml

  • Note can be any regular expression to match jobs in your default job list/view

CONFIG FILE (in YAML format)

$ cat ~/.jenkins baseuri: http://jenkins.build.host jobs: - MyJob-1 - MyJob-2 - MyJob-3 stoplight: 1

ssl_opts is any option listed in "perldoc IO::Socket::SSL"

ssl_opts: # by default we ignore invalid certs; set to nil to validate SSL_verify_callback: SSL_version: SSLv3

STATIC SCRIPT

to fetch and run the script without having to install the libraries you can just run: curl -L https://raw.githubusercontent.com/Netflix-Skunkworks/jenkins-cli/master/jenkins-static > ./jenkins chmod 755 ./jenkins

COPYRIGHT and LICENSE

Copyright 2013 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.