cdklabs/aws-delivlib

Object model is lacking "project" concept

rix0rrr opened this issue · 5 comments

Right now we're conflating "pipeline" with "project" in the object model. This shows in the following ways:

A single project can have multiple pipelines, such as we now have for the "master" and "release" pipelines. This leads to a number of features on the Pipeline class needing to be turned off on the "secondary" pipeline, which is a little silly.

  • AutoBuild is enabled on the pipeline, but it should in fact be a project feature. AutoBuild on 2 pipelines for the same project doesn't make any sense.
  • Canaries are enabled via the pipeline, but again this makes more sense as a project feature.

Also, if we could define a "project" once (and potentially its build/test steps), then it becomes trivial to spawn 1..* pipelines for it:

const project = new SoftwareProject();
project.defineSource();
project.defineBuildSteps();
project.defineTestSteps();
project.definePublishingSteps();

// Tests, no publishing
project.addIntegrationPipeline({
  branch: 'master',
});

// Tests AND publishing
project.addDistributionPipeline({
  branch: 'release',
});

// For patch releases
project.addDistributionPipeline({
  branch: 'v1.3.5',
});

// etc

Thoughts on this?

I like it

eladb commented

@rix0rrr can this be closed?

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon.

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen.