Class CfnProject.SourceProperty
Source
is a property of the AWS::CodeBuild::Project resource that specifies the source code settings for the project, such as the source code's repository type and location.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class SourceProperty : Object, CfnProject.ISourceProperty
Syntax (vb)
Public Class SourceProperty
Inherits Object
Implements CfnProject.ISourceProperty
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CodeBuild;
var sourceProperty = new SourceProperty {
Type = "type",
// the properties below are optional
Auth = new SourceAuthProperty {
Type = "type",
// the properties below are optional
Resource = "resource"
},
BuildSpec = "buildSpec",
BuildStatusConfig = new BuildStatusConfigProperty {
Context = "context",
TargetUrl = "targetUrl"
},
GitCloneDepth = 123,
GitSubmodulesConfig = new GitSubmodulesConfigProperty {
FetchSubmodules = false
},
InsecureSsl = false,
Location = "location",
ReportBuildStatus = false,
SourceIdentifier = "sourceIdentifier"
};
Synopsis
Constructors
SourceProperty() |
Properties
Auth | Information about the authorization settings for AWS CodeBuild to access the source code to be built. |
BuildSpec | The build specification for the project. |
BuildStatusConfig | Contains information that defines how the build project reports the build status to the source provider. |
GitCloneDepth | The depth of history to download. |
GitSubmodulesConfig | Information about the Git submodules configuration for the build project. |
InsecureSsl | This is used with GitHub Enterprise only. |
Location | Information about the location of the source code to be built. Valid values include:. |
ReportBuildStatus | Set to true to report the status of a build's start and finish to your source provider. |
SourceIdentifier | An identifier for this project source. |
Type | The type of repository that contains the source code to be built. Valid values include:. |
Constructors
SourceProperty()
public SourceProperty()
Properties
Auth
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
public object Auth { get; set; }
Property Value
System.Object
Remarks
This information is for the AWS CodeBuild console's use only. Your code should not get or set Auth
directly.
BuildSpec
The build specification for the project.
public string BuildSpec { get; set; }
Property Value
System.String
Remarks
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 in the AWS CodeBuild User Guide .
BuildStatusConfig
Contains information that defines how the build project reports the build status to the source provider.
public object BuildStatusConfig { get; set; }
Property Value
System.Object
Remarks
This option is only used when the source provider is GITHUB
, GITHUB_ENTERPRISE
, or BITBUCKET
.
GitCloneDepth
The depth of history to download.
public Nullable<double> GitCloneDepth { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
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.
GitSubmodulesConfig
Information about the Git submodules configuration for the build project.
public object GitSubmodulesConfig { get; set; }
Property Value
System.Object
Remarks
InsecureSsl
This is used with GitHub Enterprise only.
public object InsecureSsl { get; set; }
Property Value
System.Object
Remarks
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.
Location
Information about the location of the source code to be built. Valid values include:.
public string Location { get; set; }
Property Value
System.String
Remarks
If you specify CODEPIPELINE
for the Type
property, don't specify this property. For all of the other types, you must specify Location
.
ReportBuildStatus
Set to true to report the status of a build's start and finish to your source provider.
public object ReportBuildStatus { get; set; }
Property Value
System.Object
Remarks
This option is valid only when your source provider is GitHub, GitHub Enterprise, or Bitbucket. If this is set and you use a different source provider, an invalidInputException
is thrown.
SourceIdentifier
An identifier for this project source.
public string SourceIdentifier { get; set; }
Property Value
System.String
Remarks
The identifier can only contain alphanumeric characters and underscores, and must be less than 128 characters in length.
Type
The type of repository that contains the source code to be built. Valid values include:.
public string Type { get; set; }
Property Value
System.String