Skip to content

fix(pipeline): correct usage for qualifier in diffBucket url #760

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

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions source/packages/@aws-accelerator/accelerator/lib/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ export class AcceleratorPipeline extends Construct {
let pipelineName = `${props.prefixes.accelerator}-Pipeline`;
let buildProjectName = `${props.prefixes.accelerator}-BuildProject`;
let toolkitProjectName = `${props.prefixes.accelerator}-ToolkitProject`;
this.diffS3Uri = `s3://${this.props.prefixes.bucketName}-pipeline-${cdk.Stack.of(this).account}-${
cdk.Stack.of(this).region
}/AWSAccelerator-Pipel/Diffs`;

//
// Change the fields when qualifier is present
Expand All @@ -233,6 +236,9 @@ export class AcceleratorPipeline extends Construct {
pipelineName = `${this.props.qualifier}-pipeline`;
buildProjectName = `${this.props.qualifier}-build-project`;
toolkitProjectName = `${this.props.qualifier}-toolkit-project`;
this.diffS3Uri = `s3://${this.props.qualifier}-pipeline-${cdk.Stack.of(this).account}-${
cdk.Stack.of(this).region
}/AWSAccelerator-Pipel/Diffs`;
}

let nodeEnvVariables: { [p: string]: codebuild.BuildEnvironmentVariable } | undefined;
Expand Down Expand Up @@ -581,14 +587,11 @@ export class AcceleratorPipeline extends Construct {
});

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

this.toolkitProject = new codebuild.PipelineProject(this, 'ToolkitProject', {
projectName: toolkitProjectName,
Expand Down Expand Up @@ -1000,8 +1003,8 @@ export class AcceleratorPipeline extends Construct {
*/
const reviewLink = `https://${cdk.Stack.of(this).region}.console.${this.getConsoleUrlSuffixForPartition(
this.props.partition,
)}/s3/buckets/${this.props.prefixes.bucketName}-pipeline-${cdk.Stack.of(this).account}-${
cdk.Stack.of(this).region
)}/s3/buckets/${
this.pipeline.artifactBucket.bucketName
}?prefix=AWSAccelerator-Pipel/Diffs/#{codepipeline.PipelineExecutionId}/&region=${
cdk.Stack.of(this).region
}&bucketType=general`;
Expand Down