Initial commit: zzpyjenkins CLI tool for Jenkins interaction
A CLI tool built with Click and Rich to interact with Jenkins servers. Provides commands for viewing server info, listing jobs, triggering builds, checking build status, and watching build progress. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
78
README.md
Normal file
78
README.md
Normal file
@@ -0,0 +1,78 @@
|
||||
# zzpyjenkins
|
||||
|
||||
A CLI tool to interact with Jenkins server for building jobs.
|
||||
|
||||
## Installation
|
||||
|
||||
### Using uvx (recommended)
|
||||
|
||||
```bash
|
||||
uvx install zzpyjenkins
|
||||
```
|
||||
|
||||
Or run directly:
|
||||
|
||||
```bash
|
||||
uvx --from zzpyjenkins zzpyjenkins --help
|
||||
```
|
||||
|
||||
### From source
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv run zzpyjenkins --help
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Set the following environment variables:
|
||||
|
||||
```bash
|
||||
export JENKINS_URL="https://your-jenkins-server.com"
|
||||
export JENKINS_USERNAME="your_username"
|
||||
export JENKINS_PASSWORD="your_api_token" # or JENKINS_TOKEN
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
# Show Jenkins server info
|
||||
zzpyjenkins info
|
||||
|
||||
# List all jobs
|
||||
zzpyjenkins list
|
||||
|
||||
# List jobs with filter
|
||||
zzpyjenkins list -p "my-project"
|
||||
|
||||
# Trigger a build
|
||||
zzpyjenkins build my-job-name
|
||||
|
||||
# Trigger a build with parameters
|
||||
zzpyjenkins build my-job-name -p BRANCH=main -p ENV=staging
|
||||
|
||||
# Get build status
|
||||
zzpyjenkins status my-job-name
|
||||
|
||||
# Get specific build status
|
||||
zzpyjenkins status my-job-name 123
|
||||
|
||||
# Watch build progress
|
||||
zzpyjenkins watch my-job-name
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
# Install dev dependencies
|
||||
uv sync
|
||||
|
||||
# Run tests
|
||||
uv run pytest
|
||||
|
||||
# Format code
|
||||
uv run ruff format .
|
||||
|
||||
# Lint
|
||||
uv run ruff check .
|
||||
```
|
||||
Reference in New Issue
Block a user