A CLI tool for Jenkins
Project description
Jenkins Terminal Tool
A command-line tool for interacting with Jenkins, allowing you to configure Jenkins credentials, trigger builds, and get job statuses.
Features
- Set Jenkins configuration parameters interactively or via command-line options
- Trigger Jenkins jobs with parameters
- Get the status of Jenkins jobs
- Fetch and display Jenkins job console outputs
Installation
Using pip
-
Install the tool:
pip install jenkins-terminal
-
Run the CLI tool:
jenkins <command>
Usage
Configuration
You can set Jenkins configuration parameters either interactively or via command-line options.
Interactively
Run the following command and follow the prompts to enter your Jenkins URL, username, and API token:
jenkins config
Command-line options
You can also set the configuration parameters using command-line options:
jenkins config --username <username> --url <url> --token <token>
Trigger a Jenkins Job
Trigger a Jenkins job with parameters:
jenkins build <job> <key1>=<value1> <key2>=<value2> ...
You can also specify a YAML file containing job parameters:
jenkins build <job> <parameters.yaml>
The YAML file should contain the job parameters in the following format:
key1: value1
key2: value2
Get Jenkins Job Status
Get the status of a Jenkins job:
jenkins status <job>
Fetch Jenkins Job Console Output
Fetch and display the console output of the latest or a specific Jenkins job build:
jenkins console <job> [--build-number <number>] [--max-lines <number>]
Acknowledgements
- Typer - CLI library for Python
- Rich - Rich text and beautiful formatting in the terminal
- Jenkins - The leading open source automation server
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for jenkins_terminal-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0d4d51710cec007b129aedd9ef10282edc6f7d23b4d47154da447e0279301ed |
|
MD5 | 0927591c4c8bef147bc37c21f7a8d212 |
|
BLAKE2b-256 | b6212181bbe6b91f9ebd5caeebc4a069cab8ab5eac85c5185d2aae3036018c27 |