Class ProjectProps
Inheritance
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public class ProjectProps : Object, IProjectProps, ICommonProjectProps
Syntax (vb)
Public Class ProjectProps
Inherits Object
Implements IProjectProps, ICommonProjectProps
Remarks
ExampleMetadata: infused
Examples
Bucket bucket;
var project = new Project(this, "MyProject", new ProjectProps {
BuildSpec = BuildSpec.FromObject(new Dictionary<string, object> {
{ "version", "0.2" }
}),
Artifacts = Artifacts.S3(new S3ArtifactsProps {
Bucket = bucket,
IncludeBuildId = false,
PackageZip = true,
Path = "another/path",
Identifier = "AddArtifact1"
})
});
Synopsis
Constructors
ProjectProps() |
Properties
AllowAllOutbound | Whether to allow the CodeBuild to send all network traffic. |
Artifacts | Defines where build artifacts will be stored. |
Badge | Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge. |
BuildSpec | Filename or contents of buildspec in JSON format. |
Cache | Caching strategy to use. |
CheckSecretsInPlainTextEnvVariables | Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable. |
ConcurrentBuildLimit | Maximum number of concurrent builds. |
Description | A description of the project. |
EncryptionKey | Encryption key to use to read and write artifacts. |
Environment | Build environment to use for the build. |
EnvironmentVariables | Additional environment variables to add to the build environment. |
FileSystemLocations | An ProjectFileSystemLocation objects for a CodeBuild build project. |
GrantReportGroupPermissions | Add permissions to this project's role to create and use test report groups with name starting with the name of this project. |
Logging | Information about logs for the build project. |
ProjectName | The physical, human-readable name of the CodeBuild Project. |
QueuedTimeout | The number of minutes after which AWS CodeBuild stops the build if it's still in queue. |
Role | Service Role to assume while running the build. |
SecondaryArtifacts | The secondary artifacts for the Project. |
SecondarySources | The secondary sources for the Project. |
SecurityGroups | What security group to associate with the codebuild project's network interfaces. |
Source | The source of the build. |
SubnetSelection | Where to place the network interfaces within the VPC. |
Timeout | The number of minutes after which AWS CodeBuild stops the build if it's not complete. |
Vpc | VPC network to place codebuild network interfaces. |
Constructors
ProjectProps()
public ProjectProps()
Properties
AllowAllOutbound
Whether to allow the CodeBuild to send all network traffic.
public Nullable<bool> AllowAllOutbound { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
If set to false, you must individually add traffic rules to allow the CodeBuild project to connect to network targets.
Only used if 'vpc' is supplied.
Default: true
Artifacts
Defines where build artifacts will be stored.
public IArtifacts Artifacts { get; set; }
Property Value
Remarks
Could be: PipelineBuildArtifacts, NoArtifacts and S3Artifacts.
Default: NoArtifacts
Badge
Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
public Nullable<bool> Badge { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
For more information, see Build Badges Sample in the AWS CodeBuild User Guide.
Default: false
BuildSpec
Filename or contents of buildspec in JSON format.
public BuildSpec BuildSpec { get; set; }
Property Value
Remarks
Default: - Empty buildspec.
See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html#build-spec-ref-example
Cache
Caching strategy to use.
public Cache Cache { get; set; }
Property Value
Remarks
Default: Cache.none
CheckSecretsInPlainTextEnvVariables
Whether to check for the presence of any secrets in the environment variables of the default type, BuildEnvironmentVariableType.PLAINTEXT. Since using a secret for the value of that kind of variable would result in it being displayed in plain text in the AWS Console, the construct will throw an exception if it detects a secret was passed there. Pass this property as false if you want to skip this validation, and keep using a secret in a plain text environment variable.
public Nullable<bool> CheckSecretsInPlainTextEnvVariables { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: true
ConcurrentBuildLimit
Maximum number of concurrent builds.
public Nullable<double> ConcurrentBuildLimit { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
Minimum value is 1 and maximum is account build limit.
Default: - no explicit limit is set
Description
A description of the project.
public string Description { get; set; }
Property Value
System.String
Remarks
Use the description to identify the purpose of the project.
Default: - No description.
EncryptionKey
Encryption key to use to read and write artifacts.
public IKey EncryptionKey { get; set; }
Property Value
Remarks
Default: - The AWS-managed CMK for Amazon Simple Storage Service (Amazon S3) is used.
Environment
Build environment to use for the build.
public IBuildEnvironment Environment { get; set; }
Property Value
Remarks
Default: BuildEnvironment.LinuxBuildImage.STANDARD_1_0
EnvironmentVariables
Additional environment variables to add to the build environment.
public IDictionary<string, IBuildEnvironmentVariable> EnvironmentVariables { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, IBuildEnvironmentVariable>
Remarks
Default: - No additional environment variables are specified.
FileSystemLocations
An ProjectFileSystemLocation objects for a CodeBuild build project.
public IFileSystemLocation[] FileSystemLocations { get; set; }
Property Value
Remarks
A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, and type of a file system created using Amazon Elastic File System.
Default: - no file system locations
GrantReportGroupPermissions
Add permissions to this project's role to create and use test report groups with name starting with the name of this project.
public Nullable<bool> GrantReportGroupPermissions { get; set; }
Property Value
System.Nullable<System.Boolean>
Remarks
That is the standard report group that gets created when a simple name (in contrast to an ARN) is used in the 'reports' section of the buildspec of this project. This is usually harmless, but you can turn these off if you don't plan on using test reports in this project.
Default: true
See: https://docs.aws.amazon.com/codebuild/latest/userguide/test-report-group-naming.html
Logging
Information about logs for the build project.
public ILoggingOptions Logging { get; set; }
Property Value
Remarks
A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.
Default: - no log configuration is set
ProjectName
The physical, human-readable name of the CodeBuild Project.
public string ProjectName { get; set; }
Property Value
System.String
Remarks
Default: - Name is automatically generated.
QueuedTimeout
The number of minutes after which AWS CodeBuild stops the build if it's still in queue.
public Duration QueuedTimeout { get; set; }
Property Value
Remarks
For valid values, see the timeoutInMinutes field in the AWS CodeBuild User Guide.
Default: - no queue timeout is set
Role
Service Role to assume while running the build.
public IRole Role { get; set; }
Property Value
Remarks
Default: - A role will be created.
SecondaryArtifacts
The secondary artifacts for the Project.
public IArtifacts[] SecondaryArtifacts { get; set; }
Property Value
Remarks
Can also be added after the Project has been created by using the {@link Project#addSecondaryArtifact} method.
Default: - No secondary artifacts.
See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html
SecondarySources
The secondary sources for the Project.
public ISource[] SecondarySources { get; set; }
Property Value
ISource[]
Remarks
Can be also added after the Project has been created by using the {@link Project#addSecondarySource} method.
Default: - No secondary sources.
See: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-multi-in-out.html
SecurityGroups
What security group to associate with the codebuild project's network interfaces.
public ISecurityGroup[] SecurityGroups { get; set; }
Property Value
Remarks
If no security group is identified, one will be created automatically.
Only used if 'vpc' is supplied.
Default: - Security group will be automatically created.
Source
The source of the build.
public ISource Source { get; set; }
Property Value
Remarks
Note: if {@link NoSource} is given as the source,
then you need to provide an explicit buildSpec
.
Default: - NoSource
SubnetSelection
Where to place the network interfaces within the VPC.
public ISubnetSelection SubnetSelection { get; set; }
Property Value
Remarks
Only used if 'vpc' is supplied.
Default: - All private subnets.
Timeout
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
public Duration Timeout { get; set; }
Property Value
Remarks
For valid values, see the timeoutInMinutes field in the AWS CodeBuild User Guide.
Default: Duration.hours(1)
Vpc
VPC network to place codebuild network interfaces.
public IVpc Vpc { get; set; }
Property Value
Remarks
Specify this if the codebuild project needs to access resources in a VPC.
Default: - No VPC is specified.