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

@@ -33,7 +33,4 @@ uv run pytest
## Configuration
The tool requires these environment variables:
- `JENKINS_URL`: Jenkins server URL
- `JENKINS_USERNAME`: Jenkins username
- `JENKINS_PASSWORD` or `JENKINS_TOKEN`: API token or password
Credentials can be passed via command-line options (`-u/--url`, `-U/--username`, `-P/--password`) or environment variables (`JENKINS_URL`, `JENKINS_USERNAME`, `JENKINS_PASSWORD` or `JENKINS_TOKEN`).