Skip to main content

A command-line interface for managing Jenkins jobs

Project description

Jenkins CLI Tool

A command-line interface for managing Jenkins jobs.

Installation

Install from source

pip install .

Install in development mode

pip install -e .

Uninstallation

To remove the tool:

pip uninstall jnks-cli

Usage

Each command supports its own --debug flag for detailed logging.

Available Commands:

  1. First time setup:
jnks config --debug
  1. Initialize a Jenkins job:
jnks init --debug [--name JOB_NAME]
  1. Build a job:
# Basic build command
jnks build

# Watch console output
jnks build --watch

# Passing parameters (two equivalent ways):
jnks build --param1=value1 --param2=value2
jnks build param1=value1 param2=value2

# Example with debug and watch:
jnks build --debug --watch param1=value1 param2=value2

Note: Parameters marked with $ in .jenkins.yaml are required and must be provided during build. Example .jenkins.yaml:

name: my-job
parameters:
  BRANCH: $BRANCH           # Required parameter, must be provided
  ENV: staging             # Optional parameter with default value
  DEBUG: true             # Optional parameter with default value

To build with the above configuration:

jnks build BRANCH=main          # ENV and DEBUG use default values
jnks build BRANCH=main ENV=prod # Override default ENV value
  1. View recent builds:
jnks status --debug
  1. View console output:
# Basic console output
jnks console [--build BUILD_NUMBER]

# Watch console output in real-time
jnks console --watch [--build BUILD_NUMBER]

# With debug logging
jnks console --debug --watch [--build BUILD_NUMBER]
  1. Open in browser:
# Open job in browser
jnks open

# Open specific build in browser
jnks open --build BUILD_NUMBER

# With debug logging
jnks open --debug [--build BUILD_NUMBER]

Note: When using --watch, the command will continue to show updates until the build completes.

Debug Mode

Add --debug to any command to see detailed logs about:

  • API calls to Jenkins server
  • Parameter processing
  • Build status updates
  • Configuration loading
  • Error details

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

jnks_cli-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

jnks_cli-0.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file jnks_cli-0.1.0.tar.gz.

File metadata

  • Download URL: jnks_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for jnks_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b641760aee4fd3264c7f445f81564cc6d040f63dd7ba18afe985db577437c93f
MD5 fa1d8b3cafc6d307dbd6b7820a4c69ee
BLAKE2b-256 a9648728d0e8ec05455338daeb8ebbeade93751ca16f7db50053276eb735b756

See more details on using hashes here.

File details

Details for the file jnks_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: jnks_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.11

File hashes

Hashes for jnks_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0deb92b6cd5b2e53482dc5255112434d51fb74d3d2c8a686ecaca1ba0ee6d87
MD5 42321ec5787b8002fb3d7862bda8554c
BLAKE2b-256 ef49b7a4881ec6a3d34af0bad9cda476d110c2e17558341215b3d88c2c3c593d

See more details on using hashes here.

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