This document provides essential information for AI agents working on this repository.
This is the PingCAP-QE/ci repository - a comprehensive CI/CD configuration repository for PingCAP, TiKV, and related organizations. It manages continuous integration pipelines for multiple repositories including:
pingcap/tidb- TiDB databasepingcap/tiflash- TiFlash columnar storagepingcap/tiflow- Data flow platformtikv/tikv- Distributed key-value storetikv/pd- Placement Driver for TiKV- And more...
The CI system uses Prow (Kubernetes-native CI) + Jenkins (backend worker) architecture.
- Jenkins - CI/CD automation server
- Prow - Kubernetes-based CI/CD system (prow.tidb.net)
- Tekton - Cloud-native CI/CD framework
- Groovy - Jenkins pipeline DSL scripts
- YAML - Configuration files (Prow jobs, pod templates)
- Go - Various CI tools (
error-log-review,gomod-sync,gethash, etc.) - Kubernetes - Container orchestration for CI runners
.
├── docs/ # Documentation
│ ├── core-concepts.md # CI architecture overview
│ ├── designs/ # Design documents
│ ├── guides/ # User guides
│ └── jobs/ # Job documentation
├── prow-jobs/ # Prow job trigger configurations
│ └── <org>/<repo>/ # Organized by GitHub org/repo
├── jobs/ # Jenkins job DSL definitions
│ └── <org>/<repo>/
│ └── <branch>/ # Branch-specific configs
├── pipelines/ # Jenkins pipeline implementations
│ └── <org>/<repo>/
│ └── <branch>/
├── tekton/ # Tekton CI/CD resources
│ └── v<version>/
├── libraries/ # Jenkins shared libraries
│ └── tipipeline/
├── tools/ # CI helper tools
│ ├── error-log-review/ # PR error log checker (Go)
│ ├── gomod-sync/ # Go module sync tool (Go)
│ ├── gethash/ # Git hash utility (Go)
│ └── ...
├── scripts/ # Utility scripts
├── jenkins/ # [Deprecated] Legacy configs
├── .ci/ # CI maintenance scripts
└── configs/ # Tool configurations
- Branch specifiers:
latest(trunk),release-x.y(versions) - Job types:
presubmits(PRs),postsubmits(merges),periodics(scheduled)
- Job types:
pull(PR tests),merged(post-merge),periodics(scheduled) - Naming:
[a-z][a-z0-9_]*[a-z0-9]
- Pipeline scripts:
*.groovy - Pod templates:
pod-*.yaml
Follow the Conventional Commits specification for commit messages:
- Spec: https://www.conventionalcommits.org/en/v1.0.0/
- Format:
<type>(<scope>): <subject>type: e.g.feat,fix,docs,chore,ci,refactor,testscope: optional but recommended for this repo (e.g.prow,pipelines,jobs,tekton,tools)subject: imperative, present tense (e.g. “add”, “fix”, “update”)
Examples:
ci(prow): add presubmit for tiflow lintpipelines(tiflow): increase pipeline timeoutdocs(agents): document Conventional Commits
- Update Prow job trigger in
/prow-jobs/<org>/<repo>/ - Update Jenkins job DSL in
/jobs/<org>/<repo>/<branch>/ - Update pipeline script in
/pipelines/<org>/<repo>/<branch>/ - Run
.ci/update-prow-job-kustomization.shafter Prow job changes
Per docs/contributing.md:
- Copy pipeline to staging directory with changes
- Create PR for review
- Test in staging after PR merge
- Create PR to move from staging to production
- Include test results and links in PR
# Verify Jenkins pipelines syntax
.ci/verify-jenkins-pipelines.sh
# Update Prow job kustomization
.ci/update-prow-job-kustomization.sh
# Update Tekton kustomizations
.ci/update-tekton-kustomizations.shThis repository uses pre-commit with:
end-of-file-fixer- Ensures files end with a newlinetrailing-whitespace- Removes trailing whitespacegitleaks- Prevents secret leakage
Run before committing:
pre-commit run --all-files- Prow Dashboard: https://prow.tidb.net
- Jenkins Backend: https://do.pingcap.net/jenkins
- Prow Commands: https://prow.tidb.net/command-help
- Merge Queue: https://prow.tidb.net/tide
/ok-to-test- Trigger CI for external contributors/hold- Hold merge/unhold- Unhold merge/closeor/reopen- Close/reopen PR/test <context>- Trigger specific test
- TiDB PRs can reference tidb-test PRs:
staistics: fix ... | tidb-test=pr/2114 - Batch merging supported for tidb, tiflow, pd repos
- Hotfix branches show "Merge is forbidden" until all checks pass
Tools are located in /tools/ directory:
- Each tool has its own
go.mod - Use
go buildto compile - Some tools have configs in
/configs/
Example:
cd tools/gomod-sync
go build -o gomod-sync
./gomod-sync --source=from/go.mod --target=to/go.mod- FAQ:
docs/guides/FAQ.md - Contributing Guide:
docs/contributing.md - DeepWiki: https://deepwiki.com/PingCAP-QE/ci
- GitHub Issues: https://github.com/PingCAP-QE/ci/issues
- Community Discussions: https://github.com/PingCAP-QE/ci/discussions
- Approvers defined in
OWNERSandOWNERS_ALIASES sig-approvers-eeapproves CI infrastructure changes- Project-specific SIGs approve their respective job configs
Apache License 2.0 - See LICENSE file