jenkins: systemMessage: "企业级CI/CD平台 - 支持Java、Node.js、Python等多语言项目" numExecutors: 4 scmCheckoutRetryCount: 3 mode: NORMAL # 安全配置 securityRealm: local: allowsSignup: false users: - id: "admin" password: "admin123" name: "管理员" email: "admin@company.com" # 授权策略 authorizationStrategy: roleBased: roles: global: - name: "admin" description: "系统管理员" permissions: - "Overall/Administer" assignments: - "admin" - name: "developer" description: "开发人员" permissions: - "Overall/Read" - "Job/Build" - "Job/Cancel" - "Job/Read" - "Job/Workspace" - "Run/Replay" - "Run/Update" assignments: - "authenticated" # 全局工具配置 tool: # JDK配置 jdk: installations: - name: "JDK-17" home: "/usr/lib/jvm/java-17-openjdk-amd64" properties: - installSource: installers: - command: command: "" # Maven配置 maven: installations: - name: "Maven-3.9" home: "/usr/share/maven" properties: - installSource: installers: - maven: id: "3.9.6" # Git配置 git: installations: - name: "Default" home: "git" # SonarQube配置 unclassified: sonarGlobalConfiguration: installations: - name: "SonarQube" serverUrl: "http://116.62.163.84:15010" credentialsId: "sonar-token" # 邮件配置 mailer: smtpHost: "smtp.company.com" smtpPort: 587 charset: "UTF-8" # 全局库配置 globalLibraries: libraries: - name: "ci-cd-shared-library" defaultVersion: "main" retriever: modernSCM: scm: git: remote: "http://116.62.163.84:15006/shared/jenkins-shared-library.git" # 凭据配置 credentials: system: domainCredentials: - credentials: - usernamePassword: scope: GLOBAL id: "git-credentials" username: "wangtianqi" password: "your-git-password" description: "Git仓库凭据" - usernamePassword: scope: GLOBAL id: "deploy-server-ssh" username: "root" password: "your-server-password" description: "部署服务器SSH凭据" - string: scope: GLOBAL id: "sonar-token" secret: "squ_7e4217cabd0faae6f3b8ee359b3b8e2ac52eb69a" description: "SonarQube访问令牌"