-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(codebuild): API cleanup. (#2745)
Change the names of the source classes to be more consistent with other integrations. Make the abstract Source classes package-private. Add static factory methods to Source. Change the names of artifacts classes to be more consistent with other integrations. Add static factory methods to Artifacts. Make CodePipelineSource, CodePipelineArtifacts, NoSource, and NoArtifacts package-private. Get rid of the SourceType enum. BREAKING CHANGE: * codebuild: rename BuildSource to Source, S3BucketSource to S3Source, BuildArtifacts to Artifacts, S3BucketBuildArtifacts to S3Artifacts * codebuild: the classes CodePipelineBuildSource, CodePipelineBuildArtifacts, NoBuildSource, and NoBuildArtifacts have been removed * codebuild: rename buildScriptAsset and buildScriptAssetEntrypoint to buildScript and buildScriptEntrypoint, respectively
- Loading branch information
Showing
25 changed files
with
499 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/@aws-cdk/aws-codebuild/lib/codepipeline-artifacts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Artifacts } from './artifacts'; | ||
|
||
/** | ||
* CodePipeline Artifact definition for a CodeBuild Project. | ||
* *Note*: this type cannot be used as a secondary artifact, | ||
* and because of that, you're not allowed to specify an identifier for it. | ||
*/ | ||
export class CodePipelineArtifacts extends Artifacts { | ||
public readonly type = 'CODEPIPELINE'; | ||
|
||
constructor() { | ||
super({}); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/@aws-cdk/aws-codebuild/lib/codepipeline-source.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Source } from './source'; | ||
import { CODEPIPELINE_SOURCE_ARTIFACTS_TYPE } from './source-types'; | ||
|
||
/** | ||
* CodePipeline Source definition for a CodeBuild Project. | ||
* *Note*: this type cannot be used as a secondary source, | ||
* and because of that, you're not allowed to specify an identifier for it. | ||
*/ | ||
export class CodePipelineSource extends Source { | ||
public readonly type = CODEPIPELINE_SOURCE_ARTIFACTS_TYPE; | ||
|
||
constructor() { | ||
super({}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Artifacts } from './artifacts'; | ||
|
||
/** | ||
* A `NO_ARTIFACTS` CodeBuild Project Artifact definition. | ||
* This is the default artifact type, | ||
* if none was specified when creating the Project | ||
* (and the source was not specified to be CodePipeline). | ||
* *Note*: the `NO_ARTIFACTS` type cannot be used as a secondary artifact, | ||
* and because of that, you're not allowed to specify an identifier for it. | ||
* | ||
* This class is private to the @aws-codebuild package. | ||
*/ | ||
export class NoArtifacts extends Artifacts { | ||
public readonly type = 'NO_ARTIFACTS'; | ||
|
||
constructor() { | ||
super({}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Source } from './source'; | ||
import { NO_SOURCE_TYPE } from './source-types'; | ||
|
||
/** | ||
* A `NO_SOURCE` CodeBuild Project Source definition. | ||
* This is the default source type, | ||
* if none was specified when creating the Project. | ||
* *Note*: the `NO_SOURCE` type cannot be used as a secondary source, | ||
* and because of that, you're not allowed to specify an identifier for it. | ||
* | ||
* This class is private to the aws-codebuild package. | ||
*/ | ||
export class NoSource extends Source { | ||
public readonly type = NO_SOURCE_TYPE; | ||
|
||
constructor() { | ||
super({}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.