freeleaps-ops/apps/gitea-webhook-ambassador/configs/configs.example.yaml
zhenyus 32ba41f1f4 feat: add secret key configuration for webhook authentication
Signed-off-by: zhenyus <zhenyus@mathmast.com>
2025-03-31 00:53:33 +08:00

50 lines
1.5 KiB
YAML

server:
port: 8080
webhookPath: "/webhook"
secretHeader: "X-Gitea-Signature"
secretKey: "custom-secret-key"
jenkins:
url: "http://jenkins.example.com"
username: "jenkins-user"
token: "jenkins-api-token"
timeout: 30
gitea:
secretToken: "your-gitea-webhook-secret"
projects:
# Simple configuration with different jobs for different branches
"owner/repo1":
defaultJob: "repo1-default-job" # Used when no specific branch match is found
branchJobs:
"main": "repo1-main-job" # Specific job for the main branch
"develop": "repo1-dev-job" # Specific job for the develop branch
"release": "repo1-release-job" # Specific job for the release branch
# Advanced configuration with regex pattern matching
"owner/repo2":
defaultJob: "repo2-default-job"
branchJobs:
"main": "repo2-main-job"
branchPatterns:
- pattern: "^feature/.*$" # All feature branches
job: "repo2-feature-job"
- pattern: "^release/v[0-9]+\\.[0-9]+$" # Release branches like release/v1.0
job: "repo2-release-job"
- pattern: "^hotfix/.*$" # All hotfix branches
job: "repo2-hotfix-job"
# Simple configuration with just a default job
"owner/repo3":
defaultJob: "repo3-job" # This job is triggered for all branches
logging:
level: "info"
format: "json"
file: ""
worker:
poolSize: 10
queueSize: 100
maxRetries: 3
retryBackoff: 1