-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
AWS CodePipeline V2 Support #28694
Comments
+1 The pull request #28538 implements this feature. |
Awesome and thanks for the pull request. |
…d triggers (#28538) This PR supports pipeline type v2 with pipeline-level variables and triggers. When referring to a variable in pipeline actions, it must be specified according to the format `#{variables.variableName}`. In order to avoid the need to specify directly in this form, a new class `Variable` with a `reference()` method was created. ```ts const myVariable = new codepipeline.Variable({ variableName: 'bucket-var', description: 'description', defaultValue: 'sample', }); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { artifactBucket: sourceBucket, pipelineType: codepipeline.PipelineType.V2, variables: [myVariable], stages: [ { stageName: 'Source', actions: [sourceAction], }, { stageName: 'Deploy', actions: [ new S3DeployAction({ actionName: 'DeployAction', extract: false, // objectKey: '#{variables.bucket-var}.txt', objectKey: `${myVariable.reference()}.txt`, input: sourceOutput, bucket: deployBucket, }), ], }, ], }); ``` - user guide - https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html - https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-variables.html#reference-variables-workflow - https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-github-tags.html - CloudFormation - https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html - https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-variabledeclaration.html - https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-pipelinetriggerdeclaration.html Closes #28476 #28694. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Hi, The PR with the features has been merged. |
This issue has received a significant amount of attention so we are automatically upgrading its priority. A member of the community will see the re-prioritization and provide an update on the issue. |
…d triggers (#28538) This PR supports pipeline type v2 with pipeline-level variables and triggers. When referring to a variable in pipeline actions, it must be specified according to the format `#{variables.variableName}`. In order to avoid the need to specify directly in this form, a new class `Variable` with a `reference()` method was created. ```ts const myVariable = new codepipeline.Variable({ variableName: 'bucket-var', description: 'description', defaultValue: 'sample', }); const pipeline = new codepipeline.Pipeline(stack, 'Pipeline', { artifactBucket: sourceBucket, pipelineType: codepipeline.PipelineType.V2, variables: [myVariable], stages: [ { stageName: 'Source', actions: [sourceAction], }, { stageName: 'Deploy', actions: [ new S3DeployAction({ actionName: 'DeployAction', extract: false, // objectKey: '#{variables.bucket-var}.txt', objectKey: `${myVariable.reference()}.txt`, input: sourceOutput, bucket: deployBucket, }), ], }, ], }); ``` - user guide - https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html - https://docs.aws.amazon.com/codepipeline/latest/userguide/reference-variables.html#reference-variables-workflow - https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-github-tags.html - CloudFormation - https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-codepipeline-pipeline.html - https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-variabledeclaration.html - https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-properties-codepipeline-pipeline-pipelinetriggerdeclaration.html Closes #28476 #28694. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@go-to-k @pahud do you guys know if there is V2 support for Pipeline L3 Construct? Or any way to integrate V2 features while still using L3 Construct? The L3 Construct that i meant is this . Currently, we already have our pipelines defined
And what we want is to use V2 feature to filter based on branch
But we dont know how to integrate the 2 together, I'm assuming it is not yet exist, and that there needs to be a PR raised to include V2 features for L3 pipeline construct? |
At this time, the parameter to specify V2 type is not yet available in the pipelines module, but you can pass your existing pipeline with V2 type to props. It is good to refer to following parameters in order to match the original pipeline settings in the pipelines module. |
Please wait for this PR. Reacting to the linked issue may increase the priority of your review. |
I tried to use
Has anyone gotten that error before and know what i'm missing? Thx |
I see. The If you want to solve this problem as a feature of the CDK, it might be better if you could create a separate issue with specific use cases. |
It has been a couple weeks since the last update on this issue. Any word on when we can see this implemented? |
This issue should be closed since it has already been merged and released. |
|
@andreprawira did you solve it ? |
Describe the feature
The L2 construct
Pipeline
from namespaceaws_codepipeline
does not support the new V2 pipelines. This is crucial for running more advanced workflows that involve variables or get triggered on tags instead of pushing to a branch.Use Case
We want to run the pipelines when a tag is created instead of when a commit is pushed to a branch. Pipeline V2 is the only option.
We could use the L1 construct that is already provided, but this would:
Proposed Solution
Add support for V2 pipelines in the existing
Pipeline
construct. Ensure that there is an option to trigger the pipeline on a tag, as supported in the AWS UI and CloudFormation.Other Information
No response
Acknowledgements
CDK version used
2.114.1
Environment details (OS name and version, etc.)
macOS (the CDK Code runs on AWS CodePipeline)
The text was updated successfully, but these errors were encountered: