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.1.tar.gz (12.8 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.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zenkins-0.3.1.tar.gz
  • Upload date:
  • Size: 12.8 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.1.tar.gz
Algorithm Hash digest
SHA256 44525d2d13f03a7b4976c905bb7ede3913915b1f0ac03333084cabbbcbbd20a3
MD5 cbb131f25544cead447ede5d0e26fc17
BLAKE2b-256 ed40526a0581de7a720431b1b8eaaf0a5f2cc2b2305abfb1e5205c55730007be

See more details on using hashes here.

Provenance

The following attestation bundles were made for zenkins-0.3.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: zenkins-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d1e6fb89d29b26f61ab0b7b2bcdc4961c927e098634b514a4861e3536550bb5
MD5 098ed8a345d0e2714185a88f86b20374
BLAKE2b-256 3c72b0fe64f1ccd7f11af80285db2324a00d096cdf503245d3452783fdd7ee05

See more details on using hashes here.

Provenance

The following attestation bundles were made for zenkins-0.3.1-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