Menu
AWS CloudFormation
User Guide (API Version 2010-05-15)

AWS CodeBuild Project Source

Source is a property of the AWS::CodeBuild::Project resource that specifies the source code settings for an AWS CodeBuild project.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

Copy
{ "Auth" : SourceAuth, "BuildSpec" : String, "Location" : String, "Type" : String }

YAML

Copy
Auth: SourceAuth BuildSpec: String Location: String Type: String

Properties

Auth

Information about the authorization settings for AWS CodeBuild to access the source code to be built.

Note

Your code shouldn't get or set this information directly unless the project's source type is GITHUB.

Required: No

Type: AWS CodeBuild Project SourceAuth

Update requires: No interruption

BuildSpec

The build specification for the project. If this value is not provided, then the source code must contain a build spec 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 build spec file relative to the value of the built-in environment variable CODEBUILD_SRC_DIR. The alternate build spec 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 in the AWS CodeBuild User Guide.

Required: No

Type: String

Location

The location of the source code in the specified repository type. For more information, see the source-location field in the AWS CodeBuild User Guide.

Required: Conditional. If you specify CODEPIPELINE for the Type property, don't specify this property. For all of the other types, you must specify this property.

Type: String

Type

The type of repository that contains your source code. For valid values, see the source-type field in the AWS CodeBuild User Guide.

Required: Yes

Type: String

On this page: