feat(codepipeline-v2): start codepipeline v2
Describe the feature
I'd like to advertise for codepipeline v2 construct. Since there were some attempts to add v2 features to the current construct, none of them were successful or even rolled back.
The idea is to have an issue we can follow and maybe link some draft PRs so we can discuss the best outcome.
Related issues and comments
- #30083
- 'We should start a V2 construct' https://github.com/aws/aws-cdk/pull/30465#issuecomment-2153270981
- https://github.com/aws/aws-cdk/pull/29127
- https://github.com/aws/aws-cdk/issues/31833
- https://github.com/aws/aws-cdk/issues/32045
Feel free to add more features you like to see in the 'new V2' construct
Features
Use Case
Support V2 Pipeline features in a convenient way
Proposed Solution
Create a V2 construct that is heavily inspired by the existing Pipeline construct - but extends the required features.
Maybe: For cleanup we could roll back https://github.com/aws/aws-cdk/pull/29134 to make clear that the current one is the V1 construct and the new one is V2 so that migration should be a replacement of the Construct not a property.
Other Information
While I would be happy to extend the existing construct I can also see the argument for creating a V2 construct.
Also we probably want to have this as an alpha - I couln't find the docs on how to create an alpha module, so I'd request some help from the maintainers for this :)
Acknowledgements
- [x] I may be able to implement this feature request
- [x] This feature might incur a breaking change
CDK version used
2.197.0
I guess this might need a RFC. I'm bringing it up to the team for inputs.
Hi there, We're working on that. Will send a PR soon.
Codepipeline dev
Any ETA on this one ?
Sorry no clear ETA on this. Already in review process. Will post the update once the review gets approved. But I assume it will be delivered in a few days
Hi community, Currently we're working on the feature listed above added to current construct, and we don't have clear plan of creating new construct instead now. Codepipeline V1 and V2 are totally compatible, compared to V1, Codepipeline V2 has additional properties, and it's not worth to create new cdk construct instead of adding missing feature into current cdk construct. However, we're open to more ideas. Please send us rfc if you have ideas about how the cdk V2 construct looks like, and we'll discuss with cdk team about this. Cheers, Codepipeline dev
The features listed above now are available in aws-codepipeline lib. Please feel free to reach out to us if you have more ideas about V2 construct. Cheers, Codepipeline dev
Hi @hwum , I don't see a pipeline type v2 prop added to the code pipeline props as part of the recent changes - https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/pipelines/lib/codepipeline/codepipeline.ts
Can you advise on how we can use pipeline type v2 with in the aws-codepipeline lib? Thank you!
Hi @andreamac003, The library you're looking at is cdk L3 library, which is cdk/pipelines instead of cdk/aws-codepipeline. If you're trying to use V2 pipeline, please refer to this lib here:https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts#L346 Thanks
Thanks @hwum , is there any way to use V2 pipeline still using the aws-cdk-lib/pipeline library? I read a workaround in the slack community here, but am curious if it's possible to use PipelineType.V2 while still using aws-cdk-lib/pipeline lib. We currently have a construct using that lib and would like to upgrade, and we've been having some errors with this workaround solution
https://cdk-dev.slack.com/archives/C01FDB9UFNV/p1736170850839599?thread_ts=1735939560.532379&cid=C01FDB9UFNV
Oh I got it. Could you please raise an issue or find a current issue about this ? I'll talk to my team to see if it's prioritized so that I can support the V2 pipeline in the cdk.pipelines library. Thanks
thank you @hwum ! I have created the ticket here: https://github.com/aws/aws-cdk/issues/33995
Closing this issue as the request is completed and we support V2 type in aws-cdk-lib/aws-codepipeline module.
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.