diff --git a/packages/@aws-cdk/aws-codebuild/README.md b/packages/@aws-cdk/aws-codebuild/README.md index 898a365930cfa..59df68315b53e 100644 --- a/packages/@aws-cdk/aws-codebuild/README.md +++ b/packages/@aws-cdk/aws-codebuild/README.md @@ -53,7 +53,7 @@ const pipeline = new codepipeline.Pipeline(this, 'MyPipeline'); const sourceStage = new codepipeline.Stage(this, 'Source', { pipeline, }); -const sourceAction = new codecommit.PipelineSource(this, 'CodeCommit', { +const sourceAction = new codecommit.PipelineSourceAction(this, 'CodeCommit', { stage: sourceStage, artifactName: 'SourceOutput', repository, diff --git a/packages/@aws-cdk/aws-codebuild/lib/project.ts b/packages/@aws-cdk/aws-codebuild/lib/project.ts index 54b69244243a8..9841e438b7e56 100644 --- a/packages/@aws-cdk/aws-codebuild/lib/project.ts +++ b/packages/@aws-cdk/aws-codebuild/lib/project.ts @@ -87,7 +87,7 @@ export abstract class ProjectRef extends cdk.Construct implements events.IEventR * @param stage the Pipeline Stage to add the new Action to * @param name the name of the newly created Action * @param props the properties of the new Action - * @returns the newly created {@link PipelineSource} Action + * @returns the newly created {@link PipelineBuildAction} build Action */ public addBuildToPipeline(stage: codepipeline.IStage, name: string, props: CommonPipelineBuildActionProps): PipelineBuildAction { return new PipelineBuildAction(this.parent!, name, { diff --git a/packages/@aws-cdk/aws-codecommit/README.md b/packages/@aws-cdk/aws-codecommit/README.md index 1d352d1538498..d11eac19bf676 100644 --- a/packages/@aws-cdk/aws-codecommit/README.md +++ b/packages/@aws-cdk/aws-codecommit/README.md @@ -41,7 +41,7 @@ const pipeline = new codepipeline.Pipeline(this, 'MyPipeline', { const sourceStage = new codepipeline.Stage(this, 'Source', { pipeline, })); -const sourceAction = new codecommit.PipelineSource(this, 'CodeCommit', { +const sourceAction = new codecommit.PipelineSourceAction(this, 'CodeCommit', { stage: sourceStage, artifactName: 'SourceOutput', // name can be arbitrary repository, diff --git a/packages/@aws-cdk/aws-codecommit/lib/pipeline-action.ts b/packages/@aws-cdk/aws-codecommit/lib/pipeline-action.ts index 32656dd76f303..ca2ba851c27b5 100644 --- a/packages/@aws-cdk/aws-codecommit/lib/pipeline-action.ts +++ b/packages/@aws-cdk/aws-codecommit/lib/pipeline-action.ts @@ -3,11 +3,11 @@ import cdk = require('@aws-cdk/cdk'); import { RepositoryRef } from './repository'; /** - * Common properties for creating {@link PipelineSource} - + * Common properties for creating {@link PipelineSourceAction} - * either directly, through its constructor, * or through {@link RepositoryRef#addToPipeline}. */ -export interface CommonPipelineSourceProps { +export interface CommonPipelineSourceActionProps { /** * The name of the source's output artifact. * Output artifacts are used by CodePipeline as inputs into other actions. @@ -29,9 +29,9 @@ export interface CommonPipelineSourceProps { } /** - * Construction properties of the {@link PipelineSource CodeCommit source CodePipeline Action}. + * Construction properties of the {@link PipelineSourceAction CodeCommit source CodePipeline Action}. */ -export interface PipelineSourceProps extends CommonPipelineSourceProps, codepipeline.CommonActionProps { +export interface PipelineSourceActionProps extends CommonPipelineSourceActionProps, codepipeline.CommonActionProps { /** * The CodeCommit repository. */ @@ -41,8 +41,8 @@ export interface PipelineSourceProps extends CommonPipelineSourceProps, codepipe /** * CodePipeline Source that is provided by an AWS CodeCommit repository. */ -export class PipelineSource extends codepipeline.SourceAction { - constructor(parent: cdk.Construct, name: string, props: PipelineSourceProps) { +export class PipelineSourceAction extends codepipeline.SourceAction { + constructor(parent: cdk.Construct, name: string, props: PipelineSourceActionProps) { super(parent, name, { stage: props.stage, provider: 'CodeCommit', diff --git a/packages/@aws-cdk/aws-codecommit/lib/repository.ts b/packages/@aws-cdk/aws-codecommit/lib/repository.ts index fd8a7bf5b2128..75cdeeb886c94 100644 --- a/packages/@aws-cdk/aws-codecommit/lib/repository.ts +++ b/packages/@aws-cdk/aws-codecommit/lib/repository.ts @@ -2,7 +2,7 @@ import actions = require('@aws-cdk/aws-codepipeline-api'); import events = require('@aws-cdk/aws-events'); import cdk = require('@aws-cdk/cdk'); import { cloudformation } from './codecommit.generated'; -import { CommonPipelineSourceProps, PipelineSource } from './pipeline-action'; +import { CommonPipelineSourceActionProps, PipelineSourceAction } from './pipeline-action'; /** * Properties for the {@link RepositoryRef.import} method. @@ -56,16 +56,16 @@ export abstract class RepositoryRef extends cdk.Construct { } /** - * Convenience method for creating a new {@link PipelineSource} Action, + * 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 properties of the new Action - * @returns the newly created {@link PipelineSource} Action + * @returns the newly created {@link PipelineSourceAction} */ - public addToPipeline(stage: actions.IStage, name: string, props: CommonPipelineSourceProps): PipelineSource { - return new PipelineSource(this.parent!, name, { + public addToPipeline(stage: actions.IStage, name: string, props: CommonPipelineSourceActionProps): PipelineSourceAction { + return new PipelineSourceAction(this.parent!, name, { stage, repository: this, ...props, diff --git a/packages/@aws-cdk/aws-codepipeline-api/lib/action.ts b/packages/@aws-cdk/aws-codepipeline-api/lib/action.ts index 71855ef7d0a10..1f38679ae4837 100644 --- a/packages/@aws-cdk/aws-codepipeline-api/lib/action.ts +++ b/packages/@aws-cdk/aws-codepipeline-api/lib/action.ts @@ -97,7 +97,7 @@ export interface ActionProps extends CommonActionProps { /** * Low-level class for generic CodePipeline Actions. - * It is recommended that concrete types are used instead, such as {@link codecommit.PipelineSource} or + * It is recommended that concrete types are used instead, such as {@link codecommit.PipelineSourceAction} or * {@link codebuild.PipelineBuildAction}. */ export abstract class Action extends cdk.Construct { diff --git a/packages/@aws-cdk/aws-codepipeline-api/lib/source-action.ts b/packages/@aws-cdk/aws-codepipeline-api/lib/source-action.ts index beb3d193fb2c4..12563b0243e80 100644 --- a/packages/@aws-cdk/aws-codepipeline-api/lib/source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline-api/lib/source-action.ts @@ -44,8 +44,8 @@ export interface SourceActionProps extends CommonActionProps { /** * Low-level class for source actions. * It is recommended that concrete types are used instead, - * such as {@link s3.PipelineSource} or - * {@link codecommit.PipelineSource}. + * such as {@link s3.PipelineSourceAction} or + * {@link codecommit.PipelineSourceAction}. */ export abstract class SourceAction extends Action { public readonly artifact: Artifact; diff --git a/packages/@aws-cdk/aws-codepipeline/README.md b/packages/@aws-cdk/aws-codepipeline/README.md index 5318dd1135ce8..177f95b91969d 100644 --- a/packages/@aws-cdk/aws-codepipeline/README.md +++ b/packages/@aws-cdk/aws-codepipeline/README.md @@ -34,7 +34,7 @@ const sourceStage = pipeline.addStage('Source', { Add an Action to a Stage: ```ts -new codecommit.PipelineSource(this, 'Source', { +new codecommit.PipelineSourceAction(this, 'Source', { stage: sourceStage, artifactName: 'MyPackageSourceArtifact', repository: codecommit.RepositoryRef.import(this, 'MyExistingRepository', { diff --git a/packages/@aws-cdk/aws-codepipeline/lib/github-source-action.ts b/packages/@aws-cdk/aws-codepipeline/lib/github-source-action.ts index 037991d92b0a6..22b1a9704ec3a 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/github-source-action.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/github-source-action.ts @@ -2,9 +2,9 @@ import actions = require('@aws-cdk/aws-codepipeline-api'); import cdk = require('@aws-cdk/cdk'); /** - * Construction properties of the {@link GitHubSource GitHub source action}. + * Construction properties of the {@link GitHubSourceAction GitHub source action}. */ -export interface GitHubSourceProps extends actions.CommonActionProps { +export interface GitHubSourceActionProps extends actions.CommonActionProps { /** * The name of the source's output artifact. Output artifacts are used by CodePipeline as * inputs into other actions. @@ -51,8 +51,8 @@ export interface GitHubSourceProps extends actions.CommonActionProps { /** * Source that is provided by a GitHub repository. */ -export class GitHubSource extends actions.SourceAction { - constructor(parent: cdk.Construct, name: string, props: GitHubSourceProps) { +export class GitHubSourceAction extends actions.SourceAction { + constructor(parent: cdk.Construct, name: string, props: GitHubSourceActionProps) { super(parent, name, { stage: props.stage, owner: 'ThirdParty', diff --git a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts index cfb79d7efff5d..ba909b1ee6ef5 100644 --- a/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/lib/pipeline.ts @@ -37,7 +37,7 @@ export interface PipelineProps { * const sourceStage = new Stage(pipeline, 'Source'); * * // add a source action to the stage - * new codecommit.PipelineSource(sourceStage, 'Source', { + * new codecommit.PipelineSourceAction(sourceStage, 'Source', { * artifactName: 'SourceArtifact', * repository: repo, * }); diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.cfn-template-from-repo.lit.ts b/packages/@aws-cdk/aws-codepipeline/test/integ.cfn-template-from-repo.lit.ts index c9587e759eb97..20829d18ead2d 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.cfn-template-from-repo.lit.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.cfn-template-from-repo.lit.ts @@ -14,7 +14,7 @@ const repo = new codecommit.Repository(stack, 'TemplateRepo', { repositoryName: 'template-repo' }); const sourceStage = new codepipeline.Stage(pipeline, 'Source', { pipeline }); -const source = new codecommit.PipelineSource(stack, 'Source', { +const source = new codecommit.PipelineSourceAction(stack, 'Source', { stage: sourceStage, repository: repo, artifactName: 'SourceArtifact', diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.lambda-pipeline.ts b/packages/@aws-cdk/aws-codepipeline/test/integ.lambda-pipeline.ts index b67d284a95c81..2bfe4c24dd6ba 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.lambda-pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.lambda-pipeline.ts @@ -13,7 +13,7 @@ const sourceStage = new codepipeline.Stage(pipeline, 'Source', { pipeline }); const bucket = new s3.Bucket(stack, 'PipelineBucket', { versioned: true, }); -new s3.PipelineSource(stack, 'Source', { +new s3.PipelineSourceAction(stack, 'Source', { stage: sourceStage, artifactName: 'SourceArtifact', bucket, diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.ts b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.ts index 96e8a438ff2d0..ee572c2f15972 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-cfn.ts @@ -16,7 +16,7 @@ const sourceStage = new codepipeline.Stage(pipeline, 'Source', { pipeline }); const bucket = new s3.Bucket(stack, 'PipelineBucket', { versioned: true, }); -const source = new s3.PipelineSource(stack, 'Source', { +const source = new s3.PipelineSourceAction(stack, 'Source', { stage: sourceStage, artifactName: 'SourceArtifact', bucket, diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit-build.ts b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit-build.ts index 93609e7242f5a..62be90aa11e6d 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit-build.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-code-commit-build.ts @@ -14,7 +14,7 @@ const repository = new codecommit.Repository(stack, 'MyRepo', { const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); const sourceStage = new codepipeline.Stage(pipeline, 'source', { pipeline }); -const source = new codecommit.PipelineSource(stack, 'source', { +const source = new codecommit.PipelineSourceAction(stack, 'source', { stage: sourceStage, artifactName: 'SourceArtifact', repository, diff --git a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-events.ts b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-events.ts index 4c5fb3fbfaf19..9a1f8064b0fe7 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-events.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/integ.pipeline-events.ts @@ -19,7 +19,7 @@ const repository = new codecommit.Repository(stack, 'CodeCommitRepo', { }); const project = new codebuild.PipelineProject(stack, 'BuildProject'); -const sourceAction = new codecommit.PipelineSource(pipeline, 'CodeCommitSource', { +const sourceAction = new codecommit.PipelineSourceAction(pipeline, 'CodeCommitSource', { stage: sourceStage, artifactName: 'Source', repository, diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.cloudformation-pipeline-actions.ts b/packages/@aws-cdk/aws-codepipeline/test/test.cloudformation-pipeline-actions.ts index 614c4d91dc1ae..2c17fb1e5b00a 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.cloudformation-pipeline-actions.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.cloudformation-pipeline-actions.ts @@ -1,7 +1,7 @@ import { expect, haveResource } from '@aws-cdk/assert'; import { CreateReplaceChangeSet, CreateUpdateStack, ExecuteChangeSet } from '@aws-cdk/aws-cloudformation'; import { CodePipelineBuildArtifacts, CodePipelineSource, PipelineBuildAction, Project } from '@aws-cdk/aws-codebuild'; -import { PipelineSource, Repository } from '@aws-cdk/aws-codecommit'; +import { PipelineSourceAction, Repository } from '@aws-cdk/aws-codecommit'; import { ArtifactPath } from '@aws-cdk/aws-codepipeline-api'; import { Role } from '@aws-cdk/aws-iam'; import cdk = require('@aws-cdk/cdk'); @@ -26,7 +26,7 @@ export = { const sourceStage = new Stage(pipeline, 'source', { pipeline }); - const source = new PipelineSource(stack, 'source', { + const source = new PipelineSourceAction(stack, 'source', { stage: sourceStage, artifactName: 'SourceArtifact', repository: repo, @@ -360,7 +360,7 @@ class TestFixture extends cdk.Stack { public readonly sourceStage: Stage; public readonly deployStage: Stage; public readonly repo: Repository; - public readonly source: PipelineSource; + public readonly source: PipelineSourceAction; constructor() { super(); @@ -369,7 +369,7 @@ class TestFixture extends cdk.Stack { this.sourceStage = new Stage(this.pipeline, 'Source', { pipeline: this.pipeline }); this.deployStage = new Stage(this.pipeline, 'Deploy', { pipeline: this.pipeline }); this.repo = new Repository(this, 'MyVeryImportantRepo', { repositoryName: 'my-very-important-repo' }); - this.source = new PipelineSource(this, 'Source', { + this.source = new PipelineSourceAction(this, 'Source', { stage: this.sourceStage, artifactName: 'SourceArtifact', repository: this.repo, diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts b/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts index 226007a243e0d..fa475e8e885c2 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.general-validation.ts @@ -60,13 +60,13 @@ export = { const secondStage = new Stage(stack, 'SecondStage', { pipeline }); const bucket = new s3.Bucket(stack, 'PipelineBucket'); - new s3.PipelineSource(stack, 'FirstAction', { + new s3.PipelineSourceAction(stack, 'FirstAction', { stage: firstStage, artifactName: 'FirstArtifact', bucket, bucketKey: 'key', }); - new s3.PipelineSource(stack, 'SecondAction', { + new s3.PipelineSourceAction(stack, 'SecondAction', { stage: secondStage, artifactName: 'SecondAction', bucket, diff --git a/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts b/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts index ac39af06d2fef..3930da4039f54 100644 --- a/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts +++ b/packages/@aws-cdk/aws-codepipeline/test/test.pipeline.ts @@ -20,7 +20,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'Pipeline'); const sourceStage = new codepipeline.Stage(pipeline, 'source', { pipeline }); - const source = new codecommit.PipelineSource(stack, 'source', { + const source = new codecommit.PipelineSourceAction(stack, 'source', { stage: sourceStage, artifactName: 'SourceArtifact', repository, @@ -49,7 +49,7 @@ export = { const p = new codepipeline.Pipeline(stack, 'P'); const s1 = new codepipeline.Stage(stack, 'Source', { pipeline: p }); - new codepipeline.GitHubSource(stack, 'GH', { + new codepipeline.GitHubSourceAction(stack, 'GH', { stage: s1, artifactName: 'A', branch: 'branch', @@ -137,7 +137,7 @@ export = { const pipeline = new codepipeline.Pipeline(stack, 'PL'); const stage1 = new codepipeline.Stage(stack, 'S1', { pipeline }); - new s3.PipelineSource(stack, 'A1', { + new s3.PipelineSourceAction(stack, 'A1', { stage: stage1, artifactName: 'Artifact', bucket: new s3.Bucket(stack, 'Bucket'), @@ -340,7 +340,7 @@ export = { 'does not poll for changes'(test: Test) { const stack = new cdk.Stack(); - const result = new codecommit.PipelineSource(stack, 'stage', { + const result = new codecommit.PipelineSourceAction(stack, 'stage', { stage: stageForTesting(stack), artifactName: 'SomeArtifact', repository: repositoryForTesting(stack), @@ -353,7 +353,7 @@ export = { 'polls for changes'(test: Test) { const stack = new cdk.Stack(); - const result = new codecommit.PipelineSource(stack, 'stage', { + const result = new codecommit.PipelineSourceAction(stack, 'stage', { stage: stageForTesting(stack), artifactName: 'SomeArtifact', repository: repositoryForTesting(stack), diff --git a/packages/@aws-cdk/aws-s3/README.md b/packages/@aws-cdk/aws-s3/README.md index f5ddde6114a3e..9f8d0690c230a 100644 --- a/packages/@aws-cdk/aws-s3/README.md +++ b/packages/@aws-cdk/aws-s3/README.md @@ -90,7 +90,7 @@ const pipeline = new codepipeline.Pipeline(this, 'MyPipeline'); const sourceStage = new codepipeline.Stage(this, 'Source', { pipeline, }); -const sourceAction = new s3.PipelineSource(this, 'S3Source', { +const sourceAction = new s3.PipelineSourceAction(this, 'S3Source', { stage: sourceStage, bucket: sourceBucket, bucketKey: 'path/to/file.zip', diff --git a/packages/@aws-cdk/aws-s3/lib/bucket.ts b/packages/@aws-cdk/aws-s3/lib/bucket.ts index 1d508465f7409..1f28fee68cfd5 100644 --- a/packages/@aws-cdk/aws-s3/lib/bucket.ts +++ b/packages/@aws-cdk/aws-s3/lib/bucket.ts @@ -6,7 +6,7 @@ import cdk = require('@aws-cdk/cdk'); import { BucketPolicy } from './bucket-policy'; import { BucketNotifications } from './notifications-resource'; import perms = require('./perms'); -import { CommonPipelineSourceProps, PipelineSource } from './pipeline-action'; +import { CommonPipelineSourceActionProps, PipelineSourceAction } from './pipeline-action'; import { LifecycleRule } from './rule'; import { cloudformation } from './s3.generated'; import { parseBucketArn, parseBucketName } from './util'; @@ -102,16 +102,16 @@ export abstract class BucketRef extends cdk.Construct { } /** - * Convenience method for creating a new {@link PipelineSource} Action, + * 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 properties of the new Action - * @returns the newly created {@link PipelineSource} Action + * @returns the newly created {@link PipelineSourceAction} */ - public addToPipeline(stage: actions.IStage, name: string, props: CommonPipelineSourceProps): PipelineSource { - return new PipelineSource(this.parent!, name, { + public addToPipeline(stage: actions.IStage, name: string, props: CommonPipelineSourceActionProps): PipelineSourceAction { + return new PipelineSourceAction(this.parent!, name, { stage, bucket: this, ...props, diff --git a/packages/@aws-cdk/aws-s3/lib/pipeline-action.ts b/packages/@aws-cdk/aws-s3/lib/pipeline-action.ts index 2c86e988624fd..5df743ce799e3 100644 --- a/packages/@aws-cdk/aws-s3/lib/pipeline-action.ts +++ b/packages/@aws-cdk/aws-s3/lib/pipeline-action.ts @@ -3,11 +3,11 @@ import cdk = require('@aws-cdk/cdk'); import { BucketRef } from './bucket'; /** - * Common properties for creating {@link PipelineSource} - + * Common properties for creating {@link PipelineSourceAction} - * either directly, through its constructor, * or through {@link BucketRef#addToPipeline}. */ -export interface CommonPipelineSourceProps { +export interface CommonPipelineSourceActionProps { /** * The name of the source's output artifact. Output artifacts are used by CodePipeline as * inputs into other actions. @@ -31,9 +31,9 @@ export interface CommonPipelineSourceProps { } /** - * Construction properties of the {@link PipelineSource S3 source Action}. + * Construction properties of the {@link PipelineSourceAction S3 source Action}. */ -export interface PipelineSourceProps extends CommonPipelineSourceProps, actions.CommonActionProps { +export interface PipelineSourceActionProps extends CommonPipelineSourceActionProps, actions.CommonActionProps { /** * The Amazon S3 bucket that stores the source code */ @@ -43,8 +43,8 @@ export interface PipelineSourceProps extends CommonPipelineSourceProps, actions. /** * Source that is provided by a specific Amazon S3 object. */ -export class PipelineSource extends actions.SourceAction { - constructor(parent: cdk.Construct, name: string, props: PipelineSourceProps) { +export class PipelineSourceAction extends actions.SourceAction { + constructor(parent: cdk.Construct, name: string, props: PipelineSourceActionProps) { super(parent, name, { stage: props.stage, provider: 'S3',