Skip to content

Commit

Permalink
fix(aws-ecr): add the addToPipeline method to IRepository. (#1329)
Browse files Browse the repository at this point in the history
This is required in order to use the `addToPipeline` method on imported Repositories.
  • Loading branch information
skinny85 authored Dec 12, 2018
1 parent cb1aed9 commit c4a9b74
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions packages/@aws-cdk/aws-ecr/lib/repository-ref.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ export interface IRepository {
*/
addToResourcePolicy(statement: iam.PolicyStatement): void;

/**
* Convenience method for creating a new {@link PipelineSourceAction},
* and adding it to the given Stage.
*
* @param stage the Pipeline Stage to add the new Action to
* @param name the name of the newly created Action
* @param props the optional construction properties of the new Action
* @returns the newly created {@link PipelineSourceAction}
*/
addToPipeline(stage: codepipeline.IStage, name: string, props?: CommonPipelineSourceActionProps):
PipelineSourceAction;

/**
* Grant the given principal identity permissions to perform the actions on this repository
*/
Expand Down Expand Up @@ -161,15 +173,6 @@ export abstract class RepositoryBase extends cdk.Construct implements IRepositor
};
}

/**
* Convenience method for creating a new {@link PipelineSourceAction},
* and adding it to the given Stage.
*
* @param stage the Pipeline Stage to add the new Action to
* @param name the name of the newly created Action
* @param props the optional construction properties of the new Action
* @returns the newly created {@link PipelineSourceAction}
*/
public addToPipeline(stage: codepipeline.IStage, name: string, props: CommonPipelineSourceActionProps = {}):
PipelineSourceAction {
return new PipelineSourceAction(this, name, {
Expand Down

0 comments on commit c4a9b74

Please sign in to comment.