-
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
CodePipeline: synth error with multiple CodeCommit sources using CloudWatch Event triggers #29878
Comments
Hey, I was able to deploy this using TypeScript so I believe it should work with multiple source actions using the event triggers. This doesn't seem to be a golang-specific issue. Can you try again with the latest CDK version(v2.138.0) or above and see if it still exists? export class DummyStack extends Stack {
constructor(scope: Construct, id: string, props: StackProps) {
super(scope, id, props);
const repo1 = new codecommit.Repository(this, 'repo1', { repositoryName: 'repo1' });
const repo2 = new codecommit.Repository(this, 'repo2', { repositoryName: 'repo2' });
const output1 = new codepipeline.Artifact();
const output2 = new codepipeline.Artifact();
new codepipeline.Pipeline(this, 'pipeline', {
pipelineType: PipelineType.V2,
stages: [
{
stageName: 'Source',
actions: [
new codepipelineActions.CodeCommitSourceAction({
actionName: 'fetch-source-1',
repository: repo1,
branch: 'main',
output: output1,
trigger: codepipelineActions.CodeCommitTrigger.EVENTS,
}),
new codepipelineActions.CodeCommitSourceAction({
actionName: 'fetch-source-2',
repository: repo2,
branch: 'main',
output: output2,
trigger: codepipelineActions.CodeCommitTrigger.EVENTS,
}),
]
},
{
stageName: 'dummyBuild',
actions: [
new codepipelineActions.CloudFormationCreateReplaceChangeSetAction({
actionName: 'cfn-test',
adminPermissions: true,
changeSetName: 'dummy',
stackName: 'dummy-stack',
templatePath: output1.atPath('template.yaml'),
})
]
}
]
})
}
} Result
|
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled. |
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. |
Describe the bug
I would like to have a CodeCommit source action for each of two repositories in one pipeline stage. The usecase is one pipeline building and running integration tests between code residing in two different repositories: I want the pipeline to trigger when a commit lands in either repository.
When using the CloudWatch Events trigger type with both source actions, synth fails with the error
There is already a Construct with name '<pipeline-id>EventRule' in Pipeline
. The issue can be worked around by changing one to use a polling trigger, but this is a bug.Quite similar to #7802, which solved a similar issue where multiple source actions referring to the same branch name needed to be disambiguated.
Expected Behavior
cdk synth
should work when multiple source actions in the same pipeline use CloudWatch event triggers.Current Behavior
cdk synth
fails with the errorThere is already a Construct with name '<pipeline-id>EventRule' in Pipeline
.Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.137.0 (build bb90b4c)
Framework Version
No response
Node.js Version
18.18.2
OS
Linux
Language
Go
Language Version
go1.20.12
Other information
No response
The text was updated successfully, but these errors were encountered: