Artifactory module architecture
Applicable scenarios
- Upload, download, and archive build artifacts
- Manage file metadata, file tasks, and download tokens
- Switch or troubleshoot BkRepo / disk storage backends
- Handle report files, custom directories, and pipeline artifact paths
- Troubleshoot artifact post-processing after build completion
Inapplicable scenarios
- It is only a store component release issue and does not involve artifact storage
- It is only ordinary file path concatenation and does not involve artifact semantics and storage backends
- It is only a pipeline execution issue and does not involve artifact archiving or download
Quick guidance
- First determine which main line the problem belongs to:
- Storage model and paths: see
reference/1-artifact-storage.md
- BkRepo, tasks, and extensions: see
reference/2-bkrepo-task-extension.md
Artifactory is responsible for "how files and artifacts are stored and accessed", not the execution engine itself.
- If the problem manifests as upload succeeding but the file cannot be found, first distinguish whether it is:
- Metadata was not persisted to the database
- The backend did not store it successfully
- The path rules are wrong
- The download token or permissions are wrong
- For storage backend switching or dual-implementation issues, first confirm whether the actual implementation in use is BkRepo or the local disk implementation.
High-signal rules
PROJECT_CODE / PROJECT_ID is usually still understood by the project English identifier
- File metadata, file tasks, and the real backend storage are not the same layer
- BkRepo and Disk are two sets of backend implementations; when troubleshooting, first confirm the implementation class that is hit
- Asynchronous processing after build completion also affects the final visibility of artifacts
Key pitfalls
- Only looking at the file storage backend, not the metadata and task status
- Path rules changed but the logic affecting download, reports, or custom directories was not synchronized
- Only verifying that the upload API succeeds, not verifying the subsequent query, download, and cleanup pipelines
- Mixing store archiving and ordinary pipeline artifact archiving into the same problem
Further reading
- Storage basics:
reference/1-artifact-storage.md
- BkRepo and tasks:
reference/2-bkrepo-task-extension.md
- When project semantics are involved: also see
project-module-architecture
- When store archiving is involved: also see
store-module-architecture