Skip to content

Add Concourse a provider with compiler enhancements#527

Open
tristanpoland wants to merge 10 commits intogenesis-community:genesis-pipeline-refactorfrom
tristanpoland:providers
Open

Add Concourse a provider with compiler enhancements#527
tristanpoland wants to merge 10 commits intogenesis-community:genesis-pipeline-refactorfrom
tristanpoland:providers

Conversation

@tristanpoland
Copy link
Member

This pull request introduces comprehensive documentation for the Genesis CI pipeline system, targeting both operators and developers. The new docs clarify the architecture, data flow, AST structure, and the role of the PipelineDescriptor module, making it much easier to understand and contribute to the CI pipeline codebase. The changes are grouped as follows:

Documentation Structure and Audience

  • Added a high-level README.md in docs/ci that explains the CI pipeline system, splits documentation for operators and developers, and links to relevant guides for each audience.

Architecture and Code Flow

  • Introduced dev/architecture.md detailing the dual code paths (legacy and compiler), module map (including a mermaid diagram), file locations, entry points, data flow, provider inheritance, and the Concourse legacy bridge mechanism.

AST and PipelineDescriptor Design

  • Added dev/ast-and-descriptor.md describing the two-layer AST structure (source representation and generic pipeline), accessors and query methods, the role of PipelineDescriptor, resource and job generation, environment variable assembly, file path computation, group generation, workflow data extraction, and AST query methods.

Introduce two new CI provider implementations and documentation: add Concourse and GitHub Actions provider modules under lib/Genesis/CI/Compiler/Providers. Concourse provider (Concourse.pm) implements the CI trait and currently delegates parsing/generation to Genesis::CI::Legacy and adds deploy/graphviz/describe/accessors. GithubActions.pm is a self-contained provider that parses/validates ci.yml, normalizes git/vault settings, generates GitHub Actions workflow YAML (using YAML::PP), and writes workflows to .github/workflows/ (supports dry-run). Also add a comprehensive README for the new CI compiler architecture and update .gitignore to include /pkg.
Introduce a new CI compilation pipeline and wire it into the CLI.

- Add Genesis::CI factory and trait interface plus a Compiler orchestrator
  (Parser, Validator, ScriptDiscovery, ASTBuilder, AST, PipelineProvider).
- Provide provider discovery for 'concourse' and 'github-actions' and update
  provider modules to support the new pipeline.
- Extend bin/genesis with --platform, --output-dir and --skip-vault options
  (also add platform flag to graph/describe commands) to select the new
  compiler flow, emit compiled artifacts, and allow local compilation.
- Add debug fixtures (concourse pipeline YAML/minimal and AST JSON) and a
  test t/ci-compiler.t to exercise the compiler.
- Update Commands/Pipelines and existing provider implementations to work
  with the new compiler path.

This enables generation of a platform-agnostic AST and platform-specific
artifacts, supports inspecting compiled output without deploying, and
provides a path to migrate from the legacy single-file ci.yml format.
Introduce a complete .genesis/ci multi-file example for the Genesis CI compiler. Adds README documentation plus example pipeline.yml, integrations.yml, targets.yml, and provider-config overrides for Concourse and GitHub Actions. Includes scripts (deploy and smoke tests) and a scripts/manifest.yml demonstrating explicit script metadata, discovery, inputs/outputs, and environment requirements. This provides a ready-to-use reference for multi-region BOSH deployments, notifications, Vault/Git integration, and provider-specific compilation.
Add Genesis::CI::Compiler::PipelineDescriptor to translate the compiler's source AST into a fully-resolved generic pipeline (resource_types, resources, jobs, groups) that providers consume. Refactor Genesis::CI::Compiler::AST to separate a public "pipeline" layer from an internal "_source" representation, add pipeline accessors (resource_types, pipeline_resources, jobs, groups, graphviz, description), query helpers, and set_pipeline. Update Compiler to resolve the descriptor and attach the generic pipeline before loading providers; extend ASTBuilder to carry pipeline-related triggers/resources. Add design notes (Branch-pipeliens-new.md) and adjust Concourse provider/tests to use the new pipeline boundary. This centralizes pipeline construction and cleanly separates Genesis domain logic from provider serialization.
Rename CLI option usage to accept --provider (alias for --platform) and add a --debug-dir option to dump intermediate compiler artifacts. Normalize provider output in Genesis::CI::Compiler so provider generators that return raw strings are wrapped into a filename->content map using provider->output_files. Implement debug artifact dumping in Commands::Pipelines (requires JSON::PP): write parsed config, AST source, resolved pipeline JSON, graphviz DOT, human description, and provider output files. Update option validation to require --provider for output-dir/skip-vault/debug-dir. Add an end-to-end test t/ci-compile-e2e.t and accompanying t/repos/compile-test fixtures (pipeline, targets, integrations, and zip) to exercise the full compiler pipeline and both Concourse and GitHub Actions providers.
Removed mention of experimental support for GitHub Actions.
@tristanpoland tristanpoland marked this pull request as ready for review March 6, 2026 16:35
@tristanpoland
Copy link
Member Author

@dennisjbell https://github.com/tristanpoland/genesis/tree/providers/docs/ci These may make a good summary of the system so far for you

Clarified comment regarding GitHub Actions provider maintenance status.
@tristanpoland tristanpoland self-assigned this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant