docs: update README with config file usage
Replace command-line credential options and environment variables with config file documentation. Add the new `running` command and update all examples to use the required --server option. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
44
README.md
44
README.md
@@ -25,48 +25,54 @@ uv run zzpyjenkins --help
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can provide Jenkins credentials via command-line options or environment variables:
|
Create a config file at `~/.config/zzpyjenkins/config.toml` with your Jenkins server configurations:
|
||||||
|
|
||||||
### Command-line options (preferred)
|
```toml
|
||||||
|
[work]
|
||||||
|
url = "https://jenkins.work.com"
|
||||||
|
username = "myuser"
|
||||||
|
password = "my-api-token"
|
||||||
|
|
||||||
```bash
|
[home]
|
||||||
zzpyjenkins -u https://jenkins.example.com -U username -P token info
|
url = "http://localhost:8080"
|
||||||
|
username = "admin"
|
||||||
|
password = "admin123"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment variables
|
Use the `-s/--server` option to select which server to use.
|
||||||
|
|
||||||
```bash
|
|
||||||
export JENKINS_URL="https://your-jenkins-server.com"
|
|
||||||
export JENKINS_USERNAME="your_username"
|
|
||||||
export JENKINS_PASSWORD="your_api_token" # or JENKINS_TOKEN
|
|
||||||
```
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Show Jenkins server info
|
# Show Jenkins server info
|
||||||
zzpyjenkins info
|
zzpyjenkins -s work info
|
||||||
|
|
||||||
# List all jobs
|
# List all jobs
|
||||||
zzpyjenkins list
|
zzpyjenkins -s work list
|
||||||
|
|
||||||
# List jobs with filter
|
# List jobs with filter
|
||||||
zzpyjenkins list -p "my-project"
|
zzpyjenkins -s work list -p "my-project"
|
||||||
|
|
||||||
# Trigger a build
|
# Trigger a build
|
||||||
zzpyjenkins build my-job-name
|
zzpyjenkins -s work build my-job-name
|
||||||
|
|
||||||
# Trigger a build with parameters
|
# Trigger a build with parameters
|
||||||
zzpyjenkins build my-job-name -p BRANCH=main -p ENV=staging
|
zzpyjenkins -s work build my-job-name -p BRANCH=main -p ENV=staging
|
||||||
|
|
||||||
# Get build status
|
# Get build status
|
||||||
zzpyjenkins status my-job-name
|
zzpyjenkins -s work status my-job-name
|
||||||
|
|
||||||
# Get specific build status
|
# Get specific build status
|
||||||
zzpyjenkins status my-job-name 123
|
zzpyjenkins -s work status my-job-name 123
|
||||||
|
|
||||||
# Watch build progress
|
# Watch build progress
|
||||||
zzpyjenkins watch my-job-name
|
zzpyjenkins -s work watch my-job-name
|
||||||
|
|
||||||
|
# List running jobs
|
||||||
|
zzpyjenkins -s work running
|
||||||
|
|
||||||
|
# Show only count of running jobs
|
||||||
|
zzpyjenkins -s work running -c
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|||||||
Reference in New Issue
Block a user