Jenkins is the leading open-source automation server, providing a web-based platform for continuous integration and continuous delivery (CI/CD). In production, it orchestrates build, test, and deployment pipelines triggered by SCM changes, scheduled intervals, or manual requests. The architecture is a monolithic Java web application with a plugin-based extension system, using Stapler for URL routing, Jelly/HTML views, and a modern JavaScript frontend bundled with webpack. Key entry points include the central `Jenkins` singleton, a rich set of CLI commands (e.g., `BuildCommand`, `CreateJobCommand`), and a REST-like API. Data flows involve job scheduling via the `Queue`, execution on agents (controller/agent architecture), SCM checkout, build steps, artifact archiving, and result reporting. External dependencies include a servlet container (Jetty), Spring Security (migrating from Acegi), XStream for XML persistence, and numerous libraries for remoting, templating, and UI components. The codebase is highly extensible through `@Extension` points, descriptors, and a well-defined plugin lifecycle.
Pipelines-as-Code is a Kubernetes-native CI/CD controller that triggers Tekton PipelineRuns in response to Git webhook events from multiple providers (GitHub, GitLab, Gitea/Forgejo, Bitbucket Cloud/Data Center). In production, it listens for webhook payloads on a configurable endpoint, detects and validates the provider, matches events to PipelineRun templates stored in the repository's `.tekton/` directory using CEL expressions and annotations, resolves remote tasks and pipelines via hub or URL, creates PipelineRun resources with appropriate parameters and secrets, and reports status back to the Git provider (commit statuses, check runs, comments). It supports ChatOps commands (`/test`, `/retest`, `/cancel`), GitOps-style push commands, concurrency limits, automatic cleanup of old PipelineRuns, and optional LLM-driven failure analysis. The architecture consists of three main controllers (controller, watcher, webhook) plus a CLI tool (`tkn-pac`) for bootstrapping, repository management, and local testing. The codebase is well-structured, with clean provider abstractions, a modular queue system, extensive OpenTelemetry instrumentation, and comprehensive test coverage across all providers. While the multi-provider support introduces some duplication, the core patterns (event matching, pipeline resolution, status reporting) are cleanly separated and reusable.