-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-codebuild): Introduce a CodePipeline test Action.
- Loading branch information
Showing
9 changed files
with
205 additions
and
33 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import cdk = require("@aws-cdk/cdk"); | ||
import { Action, ActionCategory, CommonActionProps } from "./action"; | ||
import { Artifact } from "./artifact"; | ||
|
||
/** | ||
* Construction properties of the low-level {@link TestAction test Action}. | ||
*/ | ||
export interface TestActionProps extends CommonActionProps { | ||
/** | ||
* The source to use as input for this test. | ||
*/ | ||
inputArtifact: Artifact; | ||
|
||
/** | ||
* The service provider that the action calls. | ||
* | ||
* @example 'CodeBuild' | ||
*/ | ||
provider: string; | ||
|
||
/** | ||
* The action's configuration. These are key-value pairs that specify input values for an action. | ||
* For more information, see the AWS CodePipeline User Guide. | ||
* | ||
* http://docs.aws.amazon.com/codepipeline/latest/userguide/reference-pipeline-structure.html#action-requirements | ||
*/ | ||
configuration?: any; | ||
} | ||
|
||
export abstract class TestAction extends Action { | ||
constructor(parent: cdk.Construct, name: string, props: TestActionProps) { | ||
super(parent, name, { | ||
stage: props.stage, | ||
category: ActionCategory.Test, | ||
artifactBounds: { minInputs: 1, maxInputs: 1, minOutputs: 0, maxOutputs: 0 }, | ||
provider: props.provider, | ||
configuration: props.configuration, | ||
}); | ||
|
||
this.addInputArtifact(props.inputArtifact); | ||
} | ||
} |
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
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