Skip to content
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

fix(aws-ecr): add the addToPipeline method to IRepository. #1329

Merged
merged 1 commit into from
Dec 12, 2018
Merged
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
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