A powerful command-line tool for interacting with Jenkins, enabling easy configuration, build triggering, and status monitoring.
- 🔧 Interactive and command-line Jenkins configuration
- 🚀 Trigger Jenkins jobs with customizable parameters
- 📊 Retrieve and display Jenkins job statuses
- 📝 Fetch and show Jenkins job console outputs
- 📋 List builds of specified Jenkins jobs
- 💾 Template job feature for quick access to frequently used jobs
pip install jenkins-terminal
-
Set up your Jenkins configuration:
jenkins config
-
Trigger a Jenkins job:
jenkins build <job> --param key1=value1 --param key2=value2
-
Check job status:
jenkins status <job>
Set Jenkins configuration parameters interactively:
jenkins config
Or use command-line options:
jenkins config --username <username> --url <url> --token <token>
Trigger a job with inline parameters:
jenkins build <job> -p key1=value1 -p key2=value2
Use parameters from a YAML file:
jenkins build <job> -f <file>
Load parameters from a specific build:
jenkins build <job> -l <build-number>
Combine options:
jenkins build <job> -l <build-number> -f <file> -p key1=value1
Get job status:
jenkins status <job> -b <build-number>
Fetch console output:
jenkins output <job> -b <build-number> -l <max-lines>
List job builds:
jenkins builds <job>
The tool automatically saves the last executed job as a template. Run without specifying job name:
jenkins build
The tool uses ~/.config/jenkins.yaml
for storing configurations and templates.
Example:
template:
builds:
job1:
build_number: 10
parameters:
SITE: tpe001
job: job1
Contributions are welcome! Please feel free to submit a Pull Request.
- Typer - CLI library for Python
- Rich - Rich text formatting in the terminal
- Jenkins - The leading open source automation server
This project is licensed under the MIT License. See the LICENSE file for details.
If you encounter any problems or have any questions, please open an issue on GitHub.