Skip to content

Commit

Permalink
Added the feature flag to code
Browse files Browse the repository at this point in the history
  • Loading branch information
azarboon authored Jan 19, 2025
1 parent d95b45a commit fc82b24
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/aws-cdk-lib/aws-codepipeline/lib/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ import {
} from '../../core';
import * as cxapi from '../../cx-api';

const CODEPIPELINE_REMOVE_THE_COLON_FROM_STACK_ID = { [cxapi.CODEPIPELINE_REMOVE_THE_COLON_FROM_STACK_ID]: true };


/**
* Allows you to control where to place a new Stage when it's added to the Pipeline.
* Note that you can provide only one of the below properties -
Expand Down Expand Up @@ -823,7 +826,13 @@ export class Pipeline extends PipelineBase {
}

const app = this.supportScope();
const supportStackId = `cross-region-stack-${this.reuseCrossRegionSupportStacks ? pipelineAccount : pipelineStack.stackName}:${actionRegion}`;


const supportStackId = CODEPIPELINE_REMOVE_THE_COLON_FROM_STACK_ID[cxapi.CODEPIPELINE_REMOVE_THE_COLON_FROM_STACK_ID]
? `cross-region-stack-${this.reuseCrossRegionSupportStacks ? pipelineAccount : pipelineStack.stackName}-${actionRegion}`
: `cross-region-stack-${this.reuseCrossRegionSupportStacks ? pipelineAccount : pipelineStack.stackName}:${actionRegion}`;


let supportStack = app.node.tryFindChild(supportStackId) as CrossRegionSupportStack;
if (!supportStack) {
supportStack = new CrossRegionSupportStack(app, supportStackId, {
Expand Down

0 comments on commit fc82b24

Please sign in to comment.