Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipelines: Supporting a feature branch development process #25946

Open
1 of 2 tasks
justinwiley opened this issue Jun 12, 2023 · 2 comments
Open
1 of 2 tasks

pipelines: Supporting a feature branch development process #25946

justinwiley opened this issue Jun 12, 2023 · 2 comments
Labels
@aws-cdk/pipelines CDK Pipelines library effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2

Comments

@justinwiley
Copy link

justinwiley commented Jun 12, 2023

Describe the feature

Multi-branch feature development and pipelines is a common development practice. However, this functionality isn't built into CDK Pipeline natively. A blog post about a potential solution published last year describes a possible workaround, with a few serious barriers to adoption:

  1. It's incompatible with Github connections, which do not trigger event bridge notifications
  2. It's requires deploying a variety of custom resources for each branch, including 2 lambda functions that need to be access controlled, updated and maintained.

Given CDK Pipeline is intended to enable "painless continuous delivery of AWS CDK applications", it seems like supporting more than the most basic deployment process should be part of it's scope.

Use Case

Supporting a feature branch development process, without lot's of additional setup.

Proposed Solution

Update the branch parameter aws-cdk-lib/pipelines/lib/codepipeline/codepipeline-source to allow the branch parameter to be either a string or a regular expression. If it's a regular expression, only trigger the pipeline if the branch matches the pattern.

The ergonomics on a code pipeline might look like:

new CodePipeline(this, 'FeaturePipeline', {
  pipelineName: 'FeaturePipeline',
  synth: new CodeBuildStep('Synth', {
    input: CodePipelineSource.connection(
      'some-repo',
      /feat\-/, // branch pattern, 
      {
        connectionArn: `arn:aws:codestar-connections:region:acccount:connection/some connection`
      }
    ),
    commands: [
      // ....
    ]
  })
})

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.83.1

Environment details (OS name and version, etc.)

Mac OS latest

@justinwiley justinwiley added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jun 12, 2023
@github-actions github-actions bot added the @aws-cdk/pipelines CDK Pipelines library label Jun 12, 2023
@pahud pahud changed the title (module name): (short issue description) pipelines: Supporting a feature branch development process Jun 13, 2023
@pahud
Copy link
Contributor

pahud commented Jun 13, 2023

Thank you for your feature request. I just renamed the issue title but I am not sure if it's appropriate. I am making this a p2 feat request and we welcome upvotes and further ideas and pull requests for this.

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jun 13, 2023
@KevinToala
Copy link

KevinToala commented Oct 30, 2023

This would be great to implement with AWS CDK. Maybe now with aws codepipeline v2 it can be done?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/pipelines CDK Pipelines library effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p2
Projects
None yet
Development

No branches or pull requests

3 participants