Skip to content

Commit 97e044f

Browse files
committed
fix(pipeline): correct usage for qualifier in diffBucket url
closed #753
1 parent b48ad6a commit 97e044f

File tree

1 file changed

+10
-5
lines changed
  • source/packages/@aws-accelerator/accelerator/lib

1 file changed

+10
-5
lines changed

source/packages/@aws-accelerator/accelerator/lib/pipeline.ts

+10-5
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ export class AcceleratorPipeline extends Construct {
220220
let pipelineName = `${props.prefixes.accelerator}-Pipeline`;
221221
let buildProjectName = `${props.prefixes.accelerator}-BuildProject`;
222222
let toolkitProjectName = `${props.prefixes.accelerator}-ToolkitProject`;
223+
this.diffS3Uri = `s3://${this.props.prefixes.bucketName}-pipeline-${cdk.Stack.of(this).account}-${
224+
cdk.Stack.of(this).region
225+
}/AWSAccelerator-Pipel/Diffs`;
223226

224227
//
225228
// Change the fields when qualifier is present
@@ -233,6 +236,11 @@ export class AcceleratorPipeline extends Construct {
233236
pipelineName = `${this.props.qualifier}-pipeline`;
234237
buildProjectName = `${this.props.qualifier}-build-project`;
235238
toolkitProjectName = `${this.props.qualifier}-toolkit-project`;
239+
// External deployment conditions used throughout pipeline use management account id and role name
240+
// Pipeline bucket is created using qualifier and NOT this.props.prefix.
241+
this.diffS3Uri = `s3://${this.props.qualifier}-pipeline-${cdk.Stack.of(this).account}-${
242+
cdk.Stack.of(this).region
243+
}/AWSAccelerator-Pipel/Diffs`;
236244
}
237245

238246
let nodeEnvVariables: { [p: string]: codebuild.BuildEnvironmentVariable } | undefined;
@@ -581,14 +589,11 @@ export class AcceleratorPipeline extends Construct {
581589
});
582590

583591
/**
584-
* Toolkit CodeBuild poroject is used to run all Accelerator stages, including diff
592+
* Toolkit CodeBuild project is used to run all Accelerator stages, including diff
585593
* First it executes synth of all Pipeline stages and then diff within the same container.
586594
* CloudFormation templates are then reused for all further stages
587-
* Diff files are uploaded to pipeline S3 bucket
595+
* Diff files are uploaded to pipeline S3 bucket - consideration needed if running in external account
588596
*/
589-
this.diffS3Uri = `s3://${this.props.prefixes.bucketName}-pipeline-${cdk.Stack.of(this).account}-${
590-
cdk.Stack.of(this).region
591-
}/AWSAccelerator-Pipel/Diffs`;
592597

593598
this.toolkitProject = new codebuild.PipelineProject(this, 'ToolkitProject', {
594599
projectName: toolkitProjectName,

0 commit comments

Comments
 (0)