aws::codebuild-project

Creates a build project with the specified Name, Artifacts, Environment, Source, and Role.

Example

aws::codebuild-project project
    name: "project-example-name"
    description: "project-description"
    service-role: $(aws::iam-role iam-role-example)
    tags: {
        "Name": "project-example-gyro-ssh-plugin"
    }

    source
        type: "GITHUB"
        location: "https://github.com/perfectsense/gyro-ssh-plugin"
        build-spec: ".travis.yml"
        git-clone-depth: 1
    end

    source-version: "codebuild-test"

    artifact
         type: "S3"
         location: "codebuild-us-east-2-242040583208-output-bucket"
         name: "project-example-gyro-ssh-plugin"
         encryption-disabled: false
         path: ""
         packaging: "ZIP"
    end

    environment
        compute-type: "BUILD_GENERAL1_SMALL"
        type: "LINUX_CONTAINER"
        image: "aws/codebuild/standard:4.0"
        image-pull-credentials-type: "CODEBUILD"
    end

    logs-config
        cloud-watch-log
            status: "DISABLED"
        end
    end
end

Attributes

Attribute Description
artifact subresource

The build output artifacts for the build project. (Required)

type
The type of the build output artifact. Valid values are CODEPIPELINE, S3 or NO_ARTIFACTS. (Required)
encryption-disabled
When set to true the output artifacts are not encrypted.
location
The build output artifact location.
name
The pattern that is used to name and store the output artifact. (Required)
namespace-type
The type that is used to determine the name and location to store the output artifact. Valid values are NONE or BUILD_ID.
override-artifact-name
When set to true the name specified in the buildspec file overrides the artifact name.
packaging
The type of build output artifact to create. Valid values are NONE or ZIP.
path
The path that is used to name and store the output artifact.
description The description of the build project.
name The name of the build project. Valid values satisfy the regex: [[A-Za-z0-9][A-Za-z0-9\\-_]{1,254}]. (Required)
service-role The IAM role that provides permissions for the build project. (Required)
source subresource

The build input source code configuration for the build project. (Required)

type
The type of repository that contains the source code to be built. Valid values are CODECOMMIT, CODEPIPELINE, GITHUB, S3, BITBUCKET, GITHUB_ENTERPRISE or NO_SOURCE. (Required)
location
The location of the source code to be built.
build-spec
The buildspec file declaration to use for the builds in the build project.
build-status-config subresource

The config that defines how the build project reports the build status to the source provider.

context

The context of the build status CodeBuild sends to the source provider. See `Context Info

<https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/codebuild/model/BuildStatusConfig.html#getContext>`_.

target-url

The target URL of the build status CodeBuild sends to the source provider. See `Target URL Info

<https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/codebuild/model/BuildStatusConfig.html#getTargetUrl>`_.

git-clone-depth
The git clone depth for the build project. Minimum allowed value is 0.
git-submodules-config subresource

The git submodules configuration for the build project.

fetch-submodules
When set to true all Git submodules are fetched for the build project. (Required)
insecure-ssl
The field that specifies to ignore SSL warnings while connecting to the project source code.
report-build-status
The field that specifies to report the status of a build’s start and finish to the source provider.
environment subresource

The build environment configuration for the build project. (Required)

compute-type
The compute resources used by the build project. Valid values are BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, BUILD_GENERAL1_LARGE or BUILD_GENERAL1_2XLARGE. (Required)
image
The image tag or image digest that identifies the Docker image used for the build project. (Required)
type
The type of build environment used for related builds. Valid values are WINDOWS_CONTAINER, LINUX_CONTAINER, LINUX_GPU_CONTAINER, ARM_CONTAINER or WINDOWS_SERVER_2019_CONTAINER. (Required)
certificate
The certificate used with the build project.
environment-variables list subresource

The list of environment variables available to builds for the build project.

name
The name or key of the environment variable. (Required)
value
The value of the environment variable. (Required)
type
The type of the environment variable. Valid values are PLAINTEXT, PARAMETER_STORE or SECRETS_MANAGER.
image-pull-credentials-type
The type of credentials the build project uses to pull images in the build. Valid values are CODEBUILD or SERVICE_ROLE.
privileged-mode

When set to true the Docker daemon is run inside a Docker container. When set to false the Docker daemon

is run outside a Docker container.

registry-credential subresource

The credentials for access to a private registry.

credential
The Amazon Resource Name (ARN) or name of credentials created using AWS Secrets Manager. (Required)
credential-provider
The service that created the credentials to access a private Docker registry. Currently the only supported value is SECRETS_MANAGER. (Required)
tags map Specifies a list of tags that are attached to the build project.
build-batch-config subresource

The batch build options for the build project.

combine-artifacts
When set to true the build artifacts for the batch build are combined into a single artifact. (Required)
restrictions subresource

The configuration for project build batch restriction.

computed-types-allowed list
The list that specifies the compute types that are allowed for the batch build. Valid values are BUILD_GENERAL1_SMALL, BUILD_GENERAL1_MEDIUM, BUILD_GENERAL1_LARGE and BUILD_GENERAL1_2XLARGE. (Required)
maximum-builds-allowed
The maximum number of builds allowed.
service-role
The service role for the batch build project.
timeout-in-mins
The maximum amount of time that the batch build must be completed in. (Required)
logs-config subresource

The configuration to store logs for the build project.

cloud-watch-log subresource

The configuration for cloud watch logs.

status
The status configuration for the cloud watch logs for a build project. Valid values are ENABLED or DISABLED. (Required)
group-name
The group name of the cloud watch logs.
stream-name
The prefix of the stream name of the cloud watch logs.
s3-log subresource

The configuration for the S3 logs.

status
The current status of the S3 build logs. Valid values are ENABLED or DISABLED. (Required)
encryption-disabled
When set to true the S3 build log output is not encrypted.
location
The ARN of the S3 bucket and the path prefix for the S3 logs.
cache subresource

The recently used information for the build project.

type
The type of cache used by the build project. Valid values are NO_CACHE, S3 or LOCAL. (Required)
location
The cache location.
modes list
The list of local cache modes. Valid values are LOCAL_DOCKER_LAYER_CACHE, LOCAL_SOURCE_CACHE and LOCAL_CUSTOM_CACHE.
encryption-key The AWS Key Management Service Customer Master Key.
file-system-locations list subresource

The list of File System Locations for a build project.

identifier
The name used to access a file system created by Amazon EFS. (Required)
location
The location of the file system created by Amazon EFS.
mount-options
The mount options for a file system created by Amazon EFS.
mount-point
The location in the container where the file system is mounted.
type
The type of the file system. Currently the only supported value is EFS.
queued-timeout-in-minutes The number of minutes a build is allowed to be queued before it times out. Valid values are between 5 to 480.
secondary-artifacts list subresource

The list of secondary artifacts. Maximum allowed items are 12.

type
The type of the build output artifact. Valid values are CODEPIPELINE, S3 or NO_ARTIFACTS. (Required)
encryption-disabled
When set to true the output artifacts are not encrypted.
location
The build output artifact location.
name
The pattern that is used to name and store the output artifact. (Required)
namespace-type
The type that is used to determine the name and location to store the output artifact. Valid values are NONE or BUILD_ID.
override-artifact-name
When set to true the name specified in the buildspec file overrides the artifact name.
packaging
The type of build output artifact to create. Valid values are NONE or ZIP.
path
The path that is used to name and store the output artifact.
secondary-sources list subresource

The list of secondary sources. Maximum allowed items are 12.

type
The type of repository that contains the source code to be built. Valid values are CODECOMMIT, CODEPIPELINE, GITHUB, S3, BITBUCKET, GITHUB_ENTERPRISE or NO_SOURCE. (Required)
location
The location of the source code to be built.
build-spec
The buildspec file declaration to use for the builds in the build project.
build-status-config subresource

The config that defines how the build project reports the build status to the source provider.

context

The context of the build status CodeBuild sends to the source provider. See `Context Info

<https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/codebuild/model/BuildStatusConfig.html#getContext>`_.

target-url

The target URL of the build status CodeBuild sends to the source provider. See `Target URL Info

<https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/codebuild/model/BuildStatusConfig.html#getTargetUrl>`_.

git-clone-depth
The git clone depth for the build project. Minimum allowed value is 0.
git-submodules-config subresource

The git submodules configuration for the build project.

fetch-submodules
When set to true all Git submodules are fetched for the build project. (Required)
insecure-ssl
The field that specifies to ignore SSL warnings while connecting to the project source code.
report-build-status
The field that specifies to report the status of a build’s start and finish to the source provider.
secondary-source-versions list subresource

The list of optional secondary source versions. Maximum allowed items are 12.

source-identifier
The identifier for the source in the build project. (Required)
source-version
The source version for the corresponding source identifier.
source-version The version of the build input for the build project.
timeout-in-minutes The number of minutes to wait before it times out any build that has not been completed. Valid values are between 5 to 480.
vpc-config subresource

The VPC config to access resources in an Amazon VPC.

security-groups list
One or more security groups part of the configured vpc to be used with the code build. Maximum allowed items are 5. (Required)
subnets list
One or more subnets part of the configured vpc to be used with the code build. Maximum allowed items are 16. (Required)
vpc
The vpc resource to be associated with the code build. (Required)
webhook The webhook that connects repository events to a build project.
badge The build badge for the build project

Outputs

Attribute Description
arn The Amazon Resource Name (ARN) of the build project.