Add command-line options for Jenkins credentials

Allow passing URL, username, and password via global options (-u, -U, -P)
as an alternative to environment variables. Options take precedence over
environment variables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-09 12:48:21 +08:00
parent 25ad8f3a71
commit 54838dba25
3 changed files with 46 additions and 31 deletions

View File

@@ -25,7 +25,15 @@ uv run zzpyjenkins --help
## Configuration
Set the following environment variables:
You can provide Jenkins credentials via command-line options or environment variables:
### Command-line options (preferred)
```bash
zzpyjenkins -u https://jenkins.example.com -U username -P token info
```
### Environment variables
```bash
export JENKINS_URL="https://your-jenkins-server.com"