Skip to main content

CLI tool for Jenkins. List jobs, check builds, view logs, trigger builds.

Project description

zenkins

CLI tool for Jenkins. List jobs, check builds, view logs, trigger builds.

Install

uv tool install zenkins

Setup

Create ~/.config/zenkins/config.toml:

url = "http://jenkins.example.com"
user = "your-username"
token = "your-api-token"

To create an API token: go to your Jenkins instance, click your name (top right) → Configure → API Token → Add new Token.

Then verify with zenkins init.

Usage

zenkins jobs                        # List all jobs with status
zenkins status <job>                # Show last build info
zenkins builds <job>                # List recent builds
zenkins builds <job> -n 5           # List last 5 builds
zenkins log <job>                   # Show console output (last build)
zenkins log <job> 42                # Show console output for build #42
zenkins queue                       # Show build queue
zenkins build <job>                 # Trigger a build
zenkins failures <job>              # Show failing tests (last build)
zenkins failures <job> 42           # Show failing tests for build #42
zenkins failures <job> 40..45       # Failure summary across build range
zenkins failures <job> -n 10        # Failure summary for last 10 builds
zenkins artifacts <job> -l          # List artifacts (last build)
zenkins artifacts <job> 42 -d ./out # Download artifacts to directory
zenkins artifacts <job> --glob "*.xml" # Download matching artifacts
zenkins artifacts <job> -n 3 --glob "*.png" -l  # List PNGs from last 3 builds

Folder jobs use / syntax: zenkins builds ci/main, zenkins failures ci/main -n 5.

The failures command queries both JUnit/NUnit and Robot Framework test results, grouping them into persistent, intermittent, and one-off failures when using range or -n syntax.

Library usage

import zenkins

s = zenkins.client()
resp = s.get("http://jenkins.example.com/api/json")

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenkins-0.3.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zenkins-0.3.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file zenkins-0.3.0.tar.gz.

File metadata

  • Download URL: zenkins-0.3.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zenkins-0.3.0.tar.gz
Algorithm Hash digest
SHA256 04d46cef603a5725e9b2fabcbc3f16370f634c391b7f653d22c6df706fb6e460
MD5 d9922953e0c9d354fcfb357ee71dc783
BLAKE2b-256 607dd2b83013090b0c8c0404fca7d6fd150cc5ee9f194fbb0c6eb91b9ae6aa46

See more details on using hashes here.

Provenance

The following attestation bundles were made for zenkins-0.3.0.tar.gz:

Publisher: publish.yml on vivainio/zenkins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file zenkins-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: zenkins-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for zenkins-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 66855973f290335482a49de6e2546129aab64735589f406d548f5e1464533806
MD5 65fa17e49ea8d3d54888c30c90d459f4
BLAKE2b-256 a021d189c7138b09add89cd96757420af2aff27090bedf69e71c81eae46a582d

See more details on using hashes here.

Provenance

The following attestation bundles were made for zenkins-0.3.0-py3-none-any.whl:

Publisher: publish.yml on vivainio/zenkins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page