Skip to content

feat: helper to reduce GithubCDKPipeline boilerplate #391

Description

@hoegertn

What

Add a helper (e.g. taimosCdkPipeline(app, options)) that reduces the repeated GithubCDKPipeline boilerplate in every backend/infra sub-project.

Why

Every CDK sub-project across the fleet hand-writes the same GithubCDKPipeline shape:

  • the iamRoleArns triple (default / assetPublishing / synth) all set to the same deploy-role ARN,
  • the same versioning block (VersioningStrategy.commitCount() + VersioningOutputs.cloudFormationOnly()),
  • useGithubEnvironments: true,
  • a personalStage sandbox,
  • paths scoped to the package.

See nornkeep/.projen/infra.ts, wir-platform/.projen/backend.ts, radball-digital/.projen/infra.ts — near-identical modulo the role ARN and stage list.

Scope / approach

  • A thin helper taking { pipelineName, roleArn, paths, stages, personalStage? } and applying the standard versioning + environments + iamRoleArns fan-out.
  • Keep it composable — it should return the GithubCDKPipeline so a consumer can still tweak it.
  • Optional; lower priority than T1/T3/T5. Consider whether this belongs in @taimos/projen or as guidance in the scaffolding playbook, since it wraps a projen-pipelines type.

Acceptance criteria

  • A backend pipeline can be declared with role ARN + stages and nothing else.
  • Escape hatch to customize the returned pipeline.
  • Test asserts the generated workflow.
  • API.md regenerated.

Part of the taimos-projen review. Lower priority (optional polish).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions