Interface CfnProject.ISourceProperty
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.
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public interface ISourceProperty
Syntax (vb)
Public Interface 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
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:. |
Properties
Auth
Information about the authorization settings for AWS CodeBuild to access the source code to be built.
virtual object Auth { get; }
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.
virtual string BuildSpec { get; }
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.
virtual object BuildStatusConfig { get; }
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.
virtual Nullable<double> GitCloneDepth { get; }
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.
virtual object GitSubmodulesConfig { get; }
Property Value
System.Object
Remarks
InsecureSsl
This is used with GitHub Enterprise only.
virtual object InsecureSsl { get; }
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:.
virtual string Location { get; }
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.
virtual object ReportBuildStatus { get; }
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.
virtual string SourceIdentifier { get; }
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:.
string Type { get; }
Property Value
System.String