UNPKG

aws-cdk-lib

Version:

Version 2 of the AWS Cloud Development Kit library

780 lines 122 kB
import * as cdk from "../../core"; import * as constructs from "constructs"; import * as cfn_parse from "../../core/lib/helpers-internal"; /** * The `AWS::CodeBuild::Project` resource configures how AWS CodeBuild builds your source code. * * For example, it tells CodeBuild where to get the source code and which build environment to use. * * > To unset or remove a project value via CFN, explicitly provide the attribute with value as empty input. * * @cloudformationResource AWS::CodeBuild::Project * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html */ export declare class CfnProject extends cdk.CfnResource implements cdk.IInspectable, cdk.ITaggable { /** * The CloudFormation resource type name for this resource class. */ static readonly CFN_RESOURCE_TYPE_NAME: string; /** * Build a CfnProject from CloudFormation properties * * A factory method that creates a new instance of this class from an object * containing the CloudFormation properties of this resource. * Used in the @aws-cdk/cloudformation-include module. * * @internal */ static _fromCloudFormation(scope: constructs.Construct, id: string, resourceAttributes: any, options: cfn_parse.FromCloudFormationOptions): CfnProject; /** * The ARN of the AWS CodeBuild project, such as `arn:aws:codebuild:us-west-2:123456789012:project/myProjectName` . * * @cloudformationAttribute Arn */ readonly attrArn: string; /** * @cloudformationAttribute Id */ readonly attrId: string; /** * `Artifacts` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies output settings for artifacts generated by an AWS CodeBuild build. */ artifacts: CfnProject.ArtifactsProperty | cdk.IResolvable; autoRetryLimit?: number; /** * Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. */ badgeEnabled?: boolean | cdk.IResolvable; /** * A `ProjectBuildBatchConfig` object that defines the batch build options for the project. */ buildBatchConfig?: cdk.IResolvable | CfnProject.ProjectBuildBatchConfigProperty; /** * Settings that AWS CodeBuild uses to store and reuse build dependencies. */ cache?: cdk.IResolvable | CfnProject.ProjectCacheProperty; /** * The maximum number of concurrent builds that are allowed for this project. */ concurrentBuildLimit?: number; /** * A description that makes the build project easy to identify. */ description?: string; /** * The AWS Key Management Service customer master key (CMK) to be used for encrypting the build output artifacts. */ encryptionKey?: string; /** * The build environment settings for the project, such as the environment type or the environment variables to use for the build environment. */ environment: CfnProject.EnvironmentProperty | cdk.IResolvable; /** * An array of `ProjectFileSystemLocation` objects for a CodeBuild build project. */ fileSystemLocations?: Array<cdk.IResolvable | CfnProject.ProjectFileSystemLocationProperty> | cdk.IResolvable; /** * Information about logs for the build project. */ logsConfig?: cdk.IResolvable | CfnProject.LogsConfigProperty; /** * The name of the build project. */ name?: string; /** * The number of minutes a build is allowed to be queued before it times out. */ queuedTimeoutInMinutes?: number; /** * The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for the project's builds. */ resourceAccessRole?: string; /** * A list of `Artifacts` objects. */ secondaryArtifacts?: Array<CfnProject.ArtifactsProperty | cdk.IResolvable> | cdk.IResolvable; /** * An array of `ProjectSource` objects. */ secondarySources?: Array<cdk.IResolvable | CfnProject.SourceProperty> | cdk.IResolvable; /** * An array of `ProjectSourceVersion` objects. */ secondarySourceVersions?: Array<cdk.IResolvable | CfnProject.ProjectSourceVersionProperty> | cdk.IResolvable; /** * The ARN of the IAM role that enables AWS CodeBuild to interact with dependent AWS services on behalf of the AWS account. */ serviceRole: string; /** * The source code settings for the project, such as the source code's repository type and location. */ source: cdk.IResolvable | CfnProject.SourceProperty; /** * A version of the build input to be built for this project. */ sourceVersion?: string; /** * Tag Manager which manages the tags for this resource */ readonly tags: cdk.TagManager; /** * An arbitrary set of tags (key-value pairs) for the AWS CodeBuild project. */ tagsRaw?: Array<cdk.CfnTag>; /** * How long, in minutes, from 5 to 2160 (36 hours), for AWS CodeBuild to wait before timing out any related build that did not get marked as completed. */ timeoutInMinutes?: number; /** * For an existing AWS CodeBuild build project that has its source code stored in a GitHub repository, enables AWS CodeBuild to begin automatically rebuilding the source code every time a code change is pushed to the repository. */ triggers?: cdk.IResolvable | CfnProject.ProjectTriggersProperty; /** * Specifies the visibility of the project's builds. Possible values are:. */ visibility?: string; /** * `VpcConfig` specifies settings that enable AWS CodeBuild to access resources in an Amazon VPC. */ vpcConfig?: cdk.IResolvable | CfnProject.VpcConfigProperty; /** * @param scope Scope in which this resource is defined * @param id Construct identifier for this resource (unique in its scope) * @param props Resource properties */ constructor(scope: constructs.Construct, id: string, props: CfnProjectProps); protected get cfnProperties(): Record<string, any>; /** * Examines the CloudFormation resource and discloses attributes * * @param inspector tree inspector to collect and process attributes */ inspect(inspector: cdk.TreeInspector): void; protected renderProperties(props: Record<string, any>): Record<string, any>; } export declare namespace CfnProject { /** * `VpcConfig` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that enable AWS CodeBuild to access resources in an Amazon VPC. For more information, see [Use AWS CodeBuild with Amazon Virtual Private Cloud](https://docs.aws.amazon.com/codebuild/latest/userguide/vpc-support.html) in the *AWS CodeBuild User Guide* . * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html */ interface VpcConfigProperty { /** * A list of one or more security groups IDs in your Amazon VPC. * * The maximum count is 5. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-securitygroupids */ readonly securityGroupIds?: Array<string>; /** * A list of one or more subnet IDs in your Amazon VPC. * * The maximum count is 16. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-subnets */ readonly subnets?: Array<string>; /** * The ID of the Amazon VPC. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-vpcconfig.html#cfn-codebuild-project-vpcconfig-vpcid */ readonly vpcId?: string; } /** * `Source` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies the source code settings for the project, such as the source code's repository type and location. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html */ interface SourceProperty { /** * Information about the authorization settings for AWS CodeBuild to access the source code to be built. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-auth */ readonly auth?: cdk.IResolvable | CfnProject.SourceAuthProperty; /** * The build specification for the project. * * If this value is not provided, then the source code must contain a buildspec file named `buildspec.yml` at the root level. If this value is provided, it can be either a single string containing the entire build specification, or the path to an alternate buildspec file relative to the value of the built-in environment variable `CODEBUILD_SRC_DIR` . The alternate buildspec file can have a name other than `buildspec.yml` , for example `myspec.yml` or `build_spec_qa.yml` or similar. For more information, see the [Build Spec Reference](https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example) in the *AWS CodeBuild User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-buildspec */ readonly buildSpec?: string; /** * Contains information that defines how the build project reports the build status to the source provider. * * This option is only used when the source provider is `GITHUB` , `GITHUB_ENTERPRISE` , or `BITBUCKET` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-buildstatusconfig */ readonly buildStatusConfig?: CfnProject.BuildStatusConfigProperty | cdk.IResolvable; /** * The depth of history to download. * * Minimum value is 0. If this value is 0, greater than 25, or not provided, then the full history is downloaded with each build project. If your source type is Amazon S3, this value is not supported. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-gitclonedepth */ readonly gitCloneDepth?: number; /** * Information about the Git submodules configuration for the build project. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-gitsubmodulesconfig */ readonly gitSubmodulesConfig?: CfnProject.GitSubmodulesConfigProperty | cdk.IResolvable; /** * This is used with GitHub Enterprise only. * * Set to true to ignore SSL warnings while connecting to your GitHub Enterprise project repository. The default value is `false` . `InsecureSsl` should be used for testing purposes only. It should not be used in a production environment. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-insecuressl */ readonly insecureSsl?: boolean | cdk.IResolvable; /** * Information about the location of the source code to be built. Valid values include:. * * - For source code settings that are specified in the source action of a pipeline in CodePipeline, `location` should not be specified. If it is specified, CodePipeline ignores it. This is because CodePipeline uses the settings in a pipeline's source action instead of this value. * - For source code in an CodeCommit repository, the HTTPS clone URL to the repository that contains the source code and the buildspec file (for example, `https://git-codecommit.<region-ID>.amazonaws.com/v1/repos/<repo-name>` ). * - For source code in an Amazon S3 input bucket, one of the following. * * - The path to the ZIP file that contains the source code (for example, `<bucket-name>/<path>/<object-name>.zip` ). * - The path to the folder that contains the source code (for example, `<bucket-name>/<path-to-source-code>/<folder>/` ). * - For source code in a GitHub repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your GitHub account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitHub, on the GitHub *Authorize application* page, for *Organization access* , choose *Request access* next to each repository you want to allow AWS CodeBuild to have access to, and then choose *Authorize application* . (After you have connected to your GitHub account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the `source` object, set the `auth` object's `type` value to `OAUTH` . * - For source code in an GitLab or self-managed GitLab repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your GitLab account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with GitLab, on the Connections *Authorize application* page, choose *Authorize* . Then on the AWS CodeConnections *Create GitLab connection* page, choose *Connect to GitLab* . (After you have connected to your GitLab account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to override the default connection and use this connection instead, set the `auth` object's `type` value to `CODECONNECTIONS` in the `source` object. * - For source code in a Bitbucket repository, the HTTPS clone URL to the repository that contains the source and the buildspec file. You must connect your AWS account to your Bitbucket account. Use the AWS CodeBuild console to start creating a build project. When you use the console to connect (or reconnect) with Bitbucket, on the Bitbucket *Confirm access to your account* page, choose *Grant access* . (After you have connected to your Bitbucket account, you do not need to finish creating the build project. You can leave the AWS CodeBuild console.) To instruct AWS CodeBuild to use this connection, in the `source` object, set the `auth` object's `type` value to `OAUTH` . * * If you specify `CODEPIPELINE` for the `Type` property, don't specify this property. For all of the other types, you must specify `Location` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-location */ readonly location?: string; /** * Set to true to report the status of a build's start and finish to your source provider. * * This option is valid only when your source provider is GitHub, GitHub Enterprise, GitLab, GitLab Self Managed, or Bitbucket. If this is set and you use a different source provider, an `invalidInputException` is thrown. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-reportbuildstatus */ readonly reportBuildStatus?: boolean | cdk.IResolvable; /** * An identifier for this project source. * * The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-sourceidentifier */ readonly sourceIdentifier?: string; /** * The type of repository that contains the source code to be built. Valid values include:. * * - `BITBUCKET` : The source code is in a Bitbucket repository. * - `CODECOMMIT` : The source code is in an CodeCommit repository. * - `CODEPIPELINE` : The source code settings are specified in the source action of a pipeline in CodePipeline. * - `GITHUB` : The source code is in a GitHub repository. * - `GITHUB_ENTERPRISE` : The source code is in a GitHub Enterprise Server repository. * - `GITLAB` : The source code is in a GitLab repository. * - `GITLAB_SELF_MANAGED` : The source code is in a self-managed GitLab repository. * - `NO_SOURCE` : The project does not have input source code. * - `S3` : The source code is in an Amazon S3 bucket. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html#cfn-codebuild-project-source-type */ readonly type: string; } /** * `SourceAuth` is a property of the [AWS CodeBuild Project Source](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html) property type that specifies authorization settings for AWS CodeBuild to access the source code to be built. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html */ interface SourceAuthProperty { /** * The resource value that applies to the specified authorization type. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html#cfn-codebuild-project-sourceauth-resource */ readonly resource?: string; /** * The authorization type to use. * * Valid options are OAUTH, CODECONNECTIONS, or SECRETS_MANAGER. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-sourceauth.html#cfn-codebuild-project-sourceauth-type */ readonly type: string; } /** * Contains information that defines how the AWS CodeBuild build project reports the build status to the source provider. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-buildstatusconfig.html */ interface BuildStatusConfigProperty { /** * Specifies the context of the build status CodeBuild sends to the source provider. * * The usage of this parameter depends on the source provider. * * - **Bitbucket** - This parameter is used for the `name` parameter in the Bitbucket commit status. For more information, see [build](https://docs.aws.amazon.com/https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build) in the Bitbucket API documentation. * - **GitHub/GitHub Enterprise Server** - This parameter is used for the `context` parameter in the GitHub commit status. For more information, see [Create a commit status](https://docs.aws.amazon.com/https://developer.github.com/v3/repos/statuses/#create-a-commit-status) in the GitHub developer guide. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-buildstatusconfig.html#cfn-codebuild-project-buildstatusconfig-context */ readonly context?: string; /** * Specifies the target url of the build status CodeBuild sends to the source provider. * * The usage of this parameter depends on the source provider. * * - **Bitbucket** - This parameter is used for the `url` parameter in the Bitbucket commit status. For more information, see [build](https://docs.aws.amazon.com/https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/commit/%7Bnode%7D/statuses/build) in the Bitbucket API documentation. * - **GitHub/GitHub Enterprise Server** - This parameter is used for the `target_url` parameter in the GitHub commit status. For more information, see [Create a commit status](https://docs.aws.amazon.com/https://developer.github.com/v3/repos/statuses/#create-a-commit-status) in the GitHub developer guide. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-buildstatusconfig.html#cfn-codebuild-project-buildstatusconfig-targeturl */ readonly targetUrl?: string; } /** * `GitSubmodulesConfig` is a property of the [AWS CodeBuild Project Source](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-source.html) property type that specifies information about the Git submodules configuration for the build project. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-gitsubmodulesconfig.html */ interface GitSubmodulesConfigProperty { /** * Set to true to fetch Git submodules for your AWS CodeBuild build project. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-gitsubmodulesconfig.html#cfn-codebuild-project-gitsubmodulesconfig-fetchsubmodules */ readonly fetchSubmodules: boolean | cdk.IResolvable; } /** * `ProjectTriggers` is a property of the [AWS CodeBuild Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies webhooks that trigger an AWS CodeBuild build. * * > The Webhook feature isn't available in AWS CloudFormation for GitHub Enterprise projects. Use the AWS CLI or AWS CodeBuild console to create the webhook. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html */ interface ProjectTriggersProperty { /** * Specifies the type of build this webhook will trigger. Allowed values are:. * * - **BUILD** - A single build * - **BUILD_BATCH** - A batch build * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-buildtype */ readonly buildType?: string; /** * A list of lists of `WebhookFilter` objects used to determine which webhook events are triggered. * * At least one `WebhookFilter` in the array must specify `EVENT` as its type. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-filtergroups */ readonly filterGroups?: Array<Array<cdk.IResolvable | CfnProject.WebhookFilterProperty> | cdk.IResolvable> | cdk.IResolvable; /** * Contains configuration information about the scope for a webhook. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-scopeconfiguration */ readonly scopeConfiguration?: cdk.IResolvable | CfnProject.ScopeConfigurationProperty; /** * Specifies whether or not to begin automatically rebuilding the source code every time a code change is pushed to the repository. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html#cfn-codebuild-project-projecttriggers-webhook */ readonly webhook?: boolean | cdk.IResolvable; } /** * `WebhookFilter` is a structure of the `FilterGroups` property on the [AWS CodeBuild Project ProjectTriggers](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projecttriggers.html) property type that specifies which webhooks trigger an AWS CodeBuild build. * * > The Webhook feature isn't available in AWS CloudFormation for GitHub Enterprise projects. Use the AWS CLI or AWS CodeBuild console to create the webhook. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html */ interface WebhookFilterProperty { /** * Used to indicate that the `pattern` determines which webhook events do not trigger a build. * * If true, then a webhook event that does not match the `pattern` triggers a build. If false, then a webhook event that matches the `pattern` triggers a build. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-excludematchedpattern */ readonly excludeMatchedPattern?: boolean | cdk.IResolvable; /** * For a `WebHookFilter` that uses `EVENT` type, a comma-separated string that specifies one or more events. * * For example, the webhook filter `PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED` allows all push, pull request created, and pull request updated events to trigger a build. * * For a `WebHookFilter` that uses any of the other filter types, a regular expression pattern. For example, a `WebHookFilter` that uses `HEAD_REF` for its `type` and the pattern `^refs/heads/` triggers a build when the head reference is a branch with a reference name `refs/heads/branch-name` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-pattern */ readonly pattern: string; /** * The type of webhook filter. * * There are 11 webhook filter types: `EVENT` , `ACTOR_ACCOUNT_ID` , `HEAD_REF` , `BASE_REF` , `FILE_PATH` , `COMMIT_MESSAGE` , `TAG_NAME` , `RELEASE_NAME` , `REPOSITORY_NAME` , `ORGANIZATION_NAME` , and `WORKFLOW_NAME` . * * - EVENT * * - A webhook event triggers a build when the provided `pattern` matches one of nine event types: `PUSH` , `PULL_REQUEST_CREATED` , `PULL_REQUEST_UPDATED` , `PULL_REQUEST_CLOSED` , `PULL_REQUEST_REOPENED` , `PULL_REQUEST_MERGED` , `RELEASED` , `PRERELEASED` , and `WORKFLOW_JOB_QUEUED` . The `EVENT` patterns are specified as a comma-separated string. For example, `PUSH, PULL_REQUEST_CREATED, PULL_REQUEST_UPDATED` filters all push, pull request created, and pull request updated events. * * > Types `PULL_REQUEST_REOPENED` and `WORKFLOW_JOB_QUEUED` work with GitHub and GitHub Enterprise only. Types `RELEASED` and `PRERELEASED` work with GitHub only. * - ACTOR_ACCOUNT_ID * * - A webhook event triggers a build when a GitHub, GitHub Enterprise, or Bitbucket account ID matches the regular expression `pattern` . * - HEAD_REF * * - A webhook event triggers a build when the head reference matches the regular expression `pattern` . For example, `refs/heads/branch-name` and `refs/tags/tag-name` . * * > Works with GitHub and GitHub Enterprise push, GitHub and GitHub Enterprise pull request, Bitbucket push, and Bitbucket pull request events. * - BASE_REF * * - A webhook event triggers a build when the base reference matches the regular expression `pattern` . For example, `refs/heads/branch-name` . * * > Works with pull request events only. * - FILE_PATH * * - A webhook triggers a build when the path of a changed file matches the regular expression `pattern` . * * > Works with push and pull request events only. * - COMMIT_MESSAGE * * - A webhook triggers a build when the head commit message matches the regular expression `pattern` . * * > Works with push and pull request events only. * - TAG_NAME * * - A webhook triggers a build when the tag name of the release matches the regular expression `pattern` . * * > Works with `RELEASED` and `PRERELEASED` events only. * - RELEASE_NAME * * - A webhook triggers a build when the release name matches the regular expression `pattern` . * * > Works with `RELEASED` and `PRERELEASED` events only. * - REPOSITORY_NAME * * - A webhook triggers a build when the repository name matches the regular expression `pattern` . * * > Works with GitHub global or organization webhooks only. * - ORGANIZATION_NAME * * - A webhook triggers a build when the organization name matches the regular expression `pattern` . * * > Works with GitHub global webhooks only. * - WORKFLOW_NAME * * - A webhook triggers a build when the workflow name matches the regular expression `pattern` . * * > Works with `WORKFLOW_JOB_QUEUED` events only. > For CodeBuild-hosted Buildkite runner builds, WORKFLOW_NAME filters will filter by pipeline name. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-webhookfilter.html#cfn-codebuild-project-webhookfilter-type */ readonly type: string; } /** * Contains configuration information about the scope for a webhook. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html */ interface ScopeConfigurationProperty { /** * The name of either the enterprise or organization that will send webhook events to CodeBuild , depending on if the webhook is a global or organization webhook respectively. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-scopeconfiguration.html#cfn-codebuild-project-scopeconfiguration-name */ readonly name: string; } /** * `Artifacts` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies output settings for artifacts generated by an AWS CodeBuild build. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html */ interface ArtifactsProperty { /** * An identifier for this artifact definition. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-artifactidentifier */ readonly artifactIdentifier?: string; /** * Set to true if you do not want your output artifacts encrypted. * * This option is valid only if your artifacts type is Amazon Simple Storage Service (Amazon S3). If this is set with another artifacts type, an `invalidInputException` is thrown. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-encryptiondisabled */ readonly encryptionDisabled?: boolean | cdk.IResolvable; /** * Information about the build output artifact location:. * * - If `type` is set to `CODEPIPELINE` , AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output locations instead of CodeBuild . * - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. * - If `type` is set to `S3` , this is the name of the output bucket. * * If you specify `CODEPIPELINE` or `NO_ARTIFACTS` for the `Type` property, don't specify this property. For all of the other types, you must specify this property. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-location */ readonly location?: string; /** * Along with `path` and `namespaceType` , the pattern that AWS CodeBuild uses to name and store the output artifact:. * * - If `type` is set to `CODEPIPELINE` , AWS CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . * - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. * - If `type` is set to `S3` , this is the name of the output artifact object. If you set the name to be a forward slash ("/"), the artifact is stored in the root of the output bucket. * * For example: * * - If `path` is set to `MyArtifacts` , `namespaceType` is set to `BUILD_ID` , and `name` is set to `MyArtifact.zip` , then the output artifact is stored in `MyArtifacts/ *build-ID* /MyArtifact.zip` . * - If `path` is empty, `namespaceType` is set to `NONE` , and `name` is set to " `/` ", the output artifact is stored in the root of the output bucket. * - If `path` is set to `MyArtifacts` , `namespaceType` is set to `BUILD_ID` , and `name` is set to " `/` ", the output artifact is stored in `MyArtifacts/ *build-ID*` . * * If you specify `CODEPIPELINE` or `NO_ARTIFACTS` for the `Type` property, don't specify this property. For all of the other types, you must specify this property. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-name */ readonly name?: string; /** * Along with `path` and `name` , the pattern that AWS CodeBuild uses to determine the name and location to store the output artifact: - If `type` is set to `CODEPIPELINE` , CodePipeline ignores this value if specified. * * This is because CodePipeline manages its build output names instead of AWS CodeBuild . * - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. * - If `type` is set to `S3` , valid values include: * * - `BUILD_ID` : Include the build ID in the location of the build output artifact. * - `NONE` : Do not include the build ID. This is the default if `namespaceType` is not specified. * * For example, if `path` is set to `MyArtifacts` , `namespaceType` is set to `BUILD_ID` , and `name` is set to `MyArtifact.zip` , the output artifact is stored in `MyArtifacts/<build-ID>/MyArtifact.zip` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-namespacetype */ readonly namespaceType?: string; /** * If set to true a name specified in the buildspec file overrides the artifact name. * * The name specified in a buildspec file is calculated at build time and uses the Shell command language. For example, you can append a date and time to your artifact name so that it is always unique. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-overrideartifactname */ readonly overrideArtifactName?: boolean | cdk.IResolvable; /** * The type of build output artifact to create:. * * - If `type` is set to `CODEPIPELINE` , CodePipeline ignores this value if specified. This is because CodePipeline manages its build output artifacts instead of AWS CodeBuild . * - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. * - If `type` is set to `S3` , valid values include: * * - `NONE` : AWS CodeBuild creates in the output bucket a folder that contains the build output. This is the default if `packaging` is not specified. * - `ZIP` : AWS CodeBuild creates in the output bucket a ZIP file that contains the build output. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-packaging */ readonly packaging?: string; /** * Along with `namespaceType` and `name` , the pattern that AWS CodeBuild uses to name and store the output artifact:. * * - If `type` is set to `CODEPIPELINE` , CodePipeline ignores this value if specified. This is because CodePipeline manages its build output names instead of AWS CodeBuild . * - If `type` is set to `NO_ARTIFACTS` , this value is ignored if specified, because no build output is produced. * - If `type` is set to `S3` , this is the path to the output artifact. If `path` is not specified, `path` is not used. * * For example, if `path` is set to `MyArtifacts` , `namespaceType` is set to `NONE` , and `name` is set to `MyArtifact.zip` , the output artifact is stored in the output bucket at `MyArtifacts/MyArtifact.zip` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-path */ readonly path?: string; /** * The type of build output artifact. Valid values include:. * * - `CODEPIPELINE` : The build project has build output generated through CodePipeline. * * > The `CODEPIPELINE` type is not supported for `secondaryArtifacts` . * - `NO_ARTIFACTS` : The build project does not produce any build output. * - `S3` : The build project stores build output in Amazon S3. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-artifacts.html#cfn-codebuild-project-artifacts-type */ readonly type: string; } /** * `LogsConfig` is a property of the [AWS CodeBuild Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies information about logs for a build project. These can be logs in Amazon CloudWatch Logs, built in a specified S3 bucket, or both. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html */ interface LogsConfigProperty { /** * Information about CloudWatch Logs for a build project. * * CloudWatch Logs are enabled by default. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html#cfn-codebuild-project-logsconfig-cloudwatchlogs */ readonly cloudWatchLogs?: CfnProject.CloudWatchLogsConfigProperty | cdk.IResolvable; /** * Information about logs built to an S3 bucket for a build project. * * S3 logs are not enabled by default. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html#cfn-codebuild-project-logsconfig-s3logs */ readonly s3Logs?: cdk.IResolvable | CfnProject.S3LogsConfigProperty; } /** * `CloudWatchLogs` is a property of the [AWS CodeBuild Project LogsConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html) property type that specifies settings for CloudWatch logs generated by an AWS CodeBuild build. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html */ interface CloudWatchLogsConfigProperty { /** * The group name of the logs in CloudWatch Logs. * * For more information, see [Working with Log Groups and Log Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html#cfn-codebuild-project-cloudwatchlogsconfig-groupname */ readonly groupName?: string; /** * The current status of the logs in CloudWatch Logs for a build project. Valid values are:. * * - `ENABLED` : CloudWatch Logs are enabled for this build project. * - `DISABLED` : CloudWatch Logs are not enabled for this build project. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html#cfn-codebuild-project-cloudwatchlogsconfig-status */ readonly status: string; /** * The prefix of the stream name of the CloudWatch Logs. * * For more information, see [Working with Log Groups and Log Streams](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-cloudwatchlogsconfig.html#cfn-codebuild-project-cloudwatchlogsconfig-streamname */ readonly streamName?: string; } /** * `S3Logs` is a property of the [AWS CodeBuild Project LogsConfig](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-logsconfig.html) property type that specifies settings for logs generated by an AWS CodeBuild build in an S3 bucket. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html */ interface S3LogsConfigProperty { /** * Set to true if you do not want your S3 build log output encrypted. * * By default S3 build logs are encrypted. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-encryptiondisabled */ readonly encryptionDisabled?: boolean | cdk.IResolvable; /** * The ARN of an S3 bucket and the path prefix for S3 logs. * * If your Amazon S3 bucket name is `my-bucket` , and your path prefix is `build-log` , then acceptable formats are `my-bucket/build-log` or `arn:aws:s3:::my-bucket/build-log` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-location */ readonly location?: string; /** * The current status of the S3 build logs. Valid values are:. * * - `ENABLED` : S3 build logs are enabled for this build project. * - `DISABLED` : S3 build logs are not enabled for this build project. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-s3logsconfig.html#cfn-codebuild-project-s3logsconfig-status */ readonly status: string; } /** * Information about a file system created by Amazon Elastic File System (EFS). * * For more information, see [What Is Amazon Elastic File System?](https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html) * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html */ interface ProjectFileSystemLocationProperty { /** * The name used to access a file system created by Amazon EFS. * * CodeBuild creates an environment variable by appending the `identifier` in all capital letters to `CODEBUILD_` . For example, if you specify `my_efs` for `identifier` , a new environment variable is create named `CODEBUILD_MY_EFS` . * * The `identifier` is used to mount your file system. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-identifier */ readonly identifier: string; /** * A string that specifies the location of the file system created by Amazon EFS. * * Its format is `efs-dns-name:/directory-path` . You can find the DNS name of file system when you view it in the Amazon EFS console. The directory path is a path to a directory in the file system that CodeBuild mounts. For example, if the DNS name of a file system is `fs-abcd1234.efs.us-west-2.amazonaws.com` , and its mount directory is `my-efs-mount-directory` , then the `location` is `fs-abcd1234.efs.us-west-2.amazonaws.com:/my-efs-mount-directory` . * * The directory path in the format `efs-dns-name:/directory-path` is optional. If you do not specify a directory path, the location is only the DNS name and CodeBuild mounts the entire file system. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-location */ readonly location: string; /** * The mount options for a file system created by Amazon EFS. * * The default mount options used by CodeBuild are `nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2` . For more information, see [Recommended NFS Mount Options](https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-nfs-mount-settings.html) . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-mountoptions */ readonly mountOptions?: string; /** * The location in the container where you mount the file system. * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-mountpoint */ readonly mountPoint: string; /** * The type of the file system. * * The one supported type is `EFS` . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-projectfilesystemlocation.html#cfn-codebuild-project-projectfilesystemlocation-type */ readonly type: string; } /** * `Environment` is a property of the [AWS::CodeBuild::Project](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-codebuild-project.html) resource that specifies the environment for an AWS CodeBuild project. * * @struct * @stability external * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html */ interface EnvironmentProperty { /** * The ARN of the Amazon S3 bucket, path prefix, and object key that contains the PEM-encoded certificate for the build project. * * For more information, see [certificate](https://docs.aws.amazon.com/codebuild/latest/userguide/create-project-cli.html#cli.environment.certificate) in the *AWS CodeBuild User Guide* . * * @see http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-codebuild-project-environment.html#cfn-codebuild-project-environment-certificate */ readonly certifi