Reviewed-on: #10 Co-authored-by: bQUARKz <bquarkz@gmail.com> Co-committed-by: bQUARKz <bquarkz@gmail.com>
1.6 KiB
1.6 KiB
| id | discussion | title | status | created | resolved | tags | |||
|---|---|---|---|---|---|---|---|---|---|
| LSN-0020 | DSC-0019 | Lesson - Jenkins CI Standardization and Relocation | done | 2026-04-07 |
|
Lesson - Jenkins CI Standardization and Relocation
Context
The project had a Jenkinsfile stored in a non-standard location (files/config/Jenkinsfile) with outdated configurations and divergent build commands compared to the project's Makefile and GitHub Actions.
Problem
- Discoverability: Configuration files in unexpected directories increase the mental load for new contributors.
- Divergence: Maintenance becomes harder when the same logic (how to build/test the project) is duplicated in multiple places with different flags.
Solution
The Jenkinsfile was moved to the project root, following standard Jenkins conventions. Its content was updated to delegate the actual work to the Makefile (command make ci).
Key Takeaways
- Standardize over Innovate: Unless there's a strong technical reason, keep infrastructure files in their canonical locations (e.g.,
Jenkinsfileat root). - Centralize Build Logic: Use a
Makefileor similar tool to define the canonical way to build and test the project. CI pipelines should merely invoke these commands. This ensures that CI behavior can be reproduced locally by any developer. - Environment Parity: By using the same Docker image and commands across different CI providers (Jenkins and GitHub Actions), we reduce "it works on my CI" issues.