Skip to content

Latest commit

 

History

History
150 lines (97 loc) · 9.05 KB

File metadata and controls

150 lines (97 loc) · 9.05 KB

API Reference

Classes

Name Description
PullRequestCheck Represents a reference to a PullRequestCheck.

Structs

Name Description
PullRequestCheckProps No description

class PullRequestCheck

Represents a reference to a PullRequestCheck.

Implements: IConstruct, IConstruct, IConstruct, IDependable Extends: Construct

Initializer

new PullRequestCheck(scope: Construct, id: string, props: PullRequestCheckProps)
  • scope (Construct) No description
  • id (string) No description
  • props (PullRequestCheckProps) No description
    • buildSpec (BuildSpec) Filename or contents of buildspec in JSON format.
    • repository (IRepository) The CodeCommit repository.
    • allowAllOutbound (boolean) Whether to allow the CodeBuild to send all network traffic. Default: true
    • buildImage (IBuildImage) Build environment to use for the build. Default: BuildEnvironment.LinuxBuildImage.STANDARD_2_0
    • computeType (ComputeType) The type of compute to use for this build. Default: taken from {@link #buildImage#defaultComputeType}
    • environmentVariables (Map<string, BuildEnvironmentVariable>) The environment variables that your builds can use. Optional
    • postComment (boolean) Specifies whether comments should be written in the request. Default: true
    • privileged (boolean) Indicates how the project builds Docker images. Default: false
    • projectName (string) The human-visible name of this PullRequest-Project. Optional
    • role (IRole) The IAM service Role of the Project. Optional
    • securityGroups (Array<ISecurityGroup>) What security group to associate with the codebuild project's network interfaces. Default: Security group will be automatically created
    • subnetSelection (SubnetSelection) Where to place the network interfaces within the VPC. Default: All private subnets
    • updateApprovalState (boolean) Indicates whether the approval state [APPROVE, REVOKE] should be updated. Default: true
    • vpc (IVpc) VPC network to place codebuild network interfaces. Default: No VPC is specified

Methods

addToRolePolicy(statement)

Add a permission only if there's a policy attached.

addToRolePolicy(statement: PolicyStatement): void

onCheckFailed(id, options?)

Defines an event rule which triggers when a check fails.

onCheckFailed(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

onCheckStarted(id, options?)

Defines an event rule which triggers when a check starts.

onCheckStarted(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

onCheckSucceeded(id, options?)

Defines an event rule which triggers when a check complets successfully.

onCheckSucceeded(id: string, options?: OnEventOptions): Rule
  • id (string) No description
  • options (OnEventOptions) No description
    • description (string) A description of the rule's purpose. Default: No description
    • eventPattern (EventPattern) Additional restrictions for the event to route to the specified target. Default: No additional filtering based on an event pattern.
    • ruleName (string) A name for the rule. Default: AWS CloudFormation generates a unique physical ID.
    • target (IRuleTarget) The target to register for the event. Default: No target is added to the rule. Use addTarget() to add a target.

Returns:

struct PullRequestCheckProps

Name Type Description
buildSpec BuildSpec Filename or contents of buildspec in JSON format.
repository IRepository The CodeCommit repository.
allowAllOutbound? boolean Whether to allow the CodeBuild to send all network traffic.
Default: true
buildImage? IBuildImage Build environment to use for the build.
Default: BuildEnvironment.LinuxBuildImage.STANDARD_2_0
computeType? ComputeType The type of compute to use for this build.
Default: taken from {@link #buildImage#defaultComputeType}
environmentVariables? Map<string, BuildEnvironmentVariable> The environment variables that your builds can use.
Optional
postComment? boolean Specifies whether comments should be written in the request.
Default: true
privileged? boolean Indicates how the project builds Docker images.
Default: false
projectName? string The human-visible name of this PullRequest-Project.
Optional
role? IRole The IAM service Role of the Project.
Optional
securityGroups? Array<ISecurityGroup> What security group to associate with the codebuild project's network interfaces.
Default: Security group will be automatically created
subnetSelection? SubnetSelection Where to place the network interfaces within the VPC.
Default: All private subnets
updateApprovalState? boolean Indicates whether the approval state [APPROVE, REVOKE] should be updated.
Default: true
vpc? IVpc VPC network to place codebuild network interfaces.
Default: No VPC is specified