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

[Feature Request]: Support for AWS CodePipeline V2 #5832

Open
lennertcc opened this issue Jun 7, 2024 · 0 comments
Open

[Feature Request]: Support for AWS CodePipeline V2 #5832

lennertcc opened this issue Jun 7, 2024 · 0 comments
Labels
type/enhancement Issues that are improvements for existing features. type/feature Issues that are new feature requests. type/request Issues that are created by customers.

Comments

@lennertcc
Copy link

lennertcc commented Jun 7, 2024

Describe your idea/feature/enhancement

Add support for CodePipeline V2:
V2 type pipelines have the same structure as a V1 type, along with additional parameters for release safety and trigger configuration.

Proposal

The Copilot manifest could have a new parameter where we can specify which pipeline version to deploy, defaulting to V1 to maintain compatibility

Workaround

Add a CDK override to the pipeline:

  1. copilot pipeline override
  2. Select your pipeline
  3. Select cdk
  4. Change the generated stack.ts to this:
import * as cdk from 'aws-cdk-lib';
import * as path from 'path';

import { CfnPipeline } from 'aws-cdk-lib/aws-codepipeline';

interface TransformedStackProps extends cdk.StackProps {
    readonly appName: string;
}

export class TransformedStack extends cdk.Stack {
    public readonly template: cdk.cloudformation_include.CfnInclude;
    public readonly appName: string;

    constructor (scope: cdk.App, id: string, props: TransformedStackProps) {
        super(scope, id, props);
        this.template = new cdk.cloudformation_include.CfnInclude(this, 'Template', {
            templateFile: path.join('.build', 'in.yml'),
        });
        this.appName = props.appName;
        this.transformService();
    }
    
    transformService() {
        const service = this.template.getResource("Pipeline") as CfnPipeline;
        service.addPropertyOverride("PipelineType", "V2");
    }
}
  1. run copilot pipeline deploy --diff and verify the output
@lennertcc lennertcc added type/enhancement Issues that are improvements for existing features. type/feature Issues that are new feature requests. type/request Issues that are created by customers. labels Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Issues that are improvements for existing features. type/feature Issues that are new feature requests. type/request Issues that are created by customers.
Projects
None yet
Development

No branches or pull requests

1 participant