Skip to content

Commit

Permalink
Enable physical naming of the CodePipeline (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller authored and Elad Ben-Israel committed Dec 12, 2018
1 parent e715c65 commit f38a8a3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export interface PipelineProps {
*/
title?: string;

/**
* A physical name for this pipeline.
* @default a new name will be generated.
*/
pipelineName?: string;

/**
* Branch to build.
* @default master
Expand Down Expand Up @@ -97,6 +103,7 @@ export class Pipeline extends cdk.Construct {
super(parent, name);

this.pipeline = new cpipeline.Pipeline(this, 'BuildPipeline', {
pipelineName: props.pipelineName,
restartExecutionOnUpdate: props.restartExecutionOnUpdate === undefined ? true : props.restartExecutionOnUpdate
});

Expand Down Expand Up @@ -293,4 +300,4 @@ function renderEnvironmentVariables(env?: { [key: string]: string }) {
out[key] = { value };
}
return out;
}
}

0 comments on commit f38a8a3

Please sign in to comment.