Skip to main content

Jenkins Terminal Tool

A powerful command-line tool for interacting with Jenkins, enabling easy configuration, build triggering, and status monitoring.

PyPI version License: MIT

Features

  • 🔧 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

Installation

Using pip

pip install jenkins-terminal

Quick Start

  1. Set up your Jenkins configuration:

    jenkins config
    
  2. Trigger a Jenkins job:

    jenkins build <job> --param key1=value1 --param key2=value2
    
  3. Check job status:

    jenkins status <job>
    

Detailed Usage

Configuration

Set Jenkins configuration parameters interactively:

jenkins config

Or use command-line options:

jenkins config --username <username> --url <url> --token <token>

Build Triggering

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

Job Status and Output

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>

Template Job Feature

The tool automatically saves the last executed job as a template. Run without specifying job name:

jenkins build

Configuration File

The tool uses ~/.config/jenkins.yaml for storing configurations and templates.

Example:

template:
  builds:
    job1:
      build_number: 10
      parameters:
        SITE: tpe001
  job: job1

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgements

  • Typer - CLI library for Python
  • Rich - Rich text 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.

Support

If you encounter any problems or have any questions, please open an issue on GitHub.

Release files for jenkins-terminal 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for jenkins-terminal 0.7.1
File Interpreter ABI Platform
jenkins_terminal-0.7.1-py3-none-any.whl Python 3 none any Details

Release files / jenkins_terminal-0.7.1-py3-none-any.whl

Download URL jenkins_terminal-0.7.1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
89dc604c5a3fda45fdbca2d1d737de1349d6be7c6fc0f91850c1ccbc13343c04
BLAKE2b-256 checksum
How to use checksums
5ecb01f7e90c39cbbbf86c52d11a31e6c4b386cfa206910d7dc4d476afb7e9a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.7.1 This release

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page