public static final class ProjectProps.Builder
extends java.lang.Object
ProjectProps
Constructor and Description |
---|
Builder() |
public ProjectProps.Builder artifacts(IArtifacts artifacts)
ProjectProps.getArtifacts()
artifacts
- Defines where build artifacts will be stored.
Could be: PipelineBuildArtifacts, NoArtifacts and S3Artifacts.this
public ProjectProps.Builder secondaryArtifacts(java.util.List<? extends IArtifacts> secondaryArtifacts)
ProjectProps.getSecondaryArtifacts()
secondaryArtifacts
- The secondary artifacts for the Project.
Can also be added after the Project has been created by using the {@link Project#addSecondaryArtifact} method.this
public ProjectProps.Builder secondarySources(java.util.List<? extends ISource> secondarySources)
ProjectProps.getSecondarySources()
secondarySources
- The secondary sources for the Project.
Can be also added after the Project has been created by using the {@link Project#addSecondarySource} method.this
public ProjectProps.Builder source(ISource source)
ProjectProps.getSource()
source
- The source of the build.
Note: if {@link NoSource} is given as the source,
then you need to provide an explicit buildSpec
.this
public ProjectProps.Builder allowAllOutbound(java.lang.Boolean allowAllOutbound)
CommonProjectProps.getAllowAllOutbound()
allowAllOutbound
- Whether to allow the CodeBuild to send all network traffic.
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.
this
public ProjectProps.Builder badge(java.lang.Boolean badge)
CommonProjectProps.getBadge()
badge
- Indicates whether AWS CodeBuild generates a publicly accessible URL for your project's build badge.
For more information, see Build Badges Sample
in the AWS CodeBuild User Guide.this
public ProjectProps.Builder buildSpec(BuildSpec buildSpec)
CommonProjectProps.getBuildSpec()
buildSpec
- Filename or contents of buildspec in JSON format.this
public ProjectProps.Builder cache(Cache cache)
CommonProjectProps.getCache()
cache
- Caching strategy to use.this
public ProjectProps.Builder checkSecretsInPlainTextEnvVariables(java.lang.Boolean checkSecretsInPlainTextEnvVariables)
CommonProjectProps.getCheckSecretsInPlainTextEnvVariables()
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.this
public ProjectProps.Builder concurrentBuildLimit(java.lang.Number concurrentBuildLimit)
CommonProjectProps.getConcurrentBuildLimit()
concurrentBuildLimit
- Maximum number of concurrent builds.
Minimum value is 1 and maximum is account build limit.this
public ProjectProps.Builder description(java.lang.String description)
CommonProjectProps.getDescription()
description
- A description of the project.
Use the description to identify the purpose
of the project.this
public ProjectProps.Builder encryptionKey(IKey encryptionKey)
CommonProjectProps.getEncryptionKey()
encryptionKey
- Encryption key to use to read and write artifacts.this
public ProjectProps.Builder environment(BuildEnvironment environment)
CommonProjectProps.getEnvironment()
environment
- Build environment to use for the build.this
public ProjectProps.Builder environmentVariables(java.util.Map<java.lang.String,? extends BuildEnvironmentVariable> environmentVariables)
CommonProjectProps.getEnvironmentVariables()
environmentVariables
- Additional environment variables to add to the build environment.this
public ProjectProps.Builder fileSystemLocations(java.util.List<? extends IFileSystemLocation> fileSystemLocations)
CommonProjectProps.getFileSystemLocations()
fileSystemLocations
- An ProjectFileSystemLocation objects for a CodeBuild build project.
A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint,
and type of a file system created using Amazon Elastic File System.this
public ProjectProps.Builder grantReportGroupPermissions(java.lang.Boolean grantReportGroupPermissions)
CommonProjectProps.getGrantReportGroupPermissions()
grantReportGroupPermissions
- Add permissions to this project's role to create and use test report groups with name starting with the name of this project.
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.this
public ProjectProps.Builder logging(LoggingOptions logging)
CommonProjectProps.getLogging()
logging
- Information about logs for the build project.
A project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.this
public ProjectProps.Builder projectName(java.lang.String projectName)
CommonProjectProps.getProjectName()
projectName
- The physical, human-readable name of the CodeBuild Project.this
public ProjectProps.Builder queuedTimeout(Duration queuedTimeout)
CommonProjectProps.getQueuedTimeout()
queuedTimeout
- The number of minutes after which AWS CodeBuild stops the build if it's still in queue.
For valid values, see the timeoutInMinutes field in the AWS
CodeBuild User Guide.this
public ProjectProps.Builder role(IRole role)
CommonProjectProps.getRole()
role
- Service Role to assume while running the build.this
public ProjectProps.Builder securityGroups(java.util.List<? extends ISecurityGroup> securityGroups)
CommonProjectProps.getSecurityGroups()
securityGroups
- What security group to associate with the codebuild project's network interfaces.
If no security group is identified, one will be created automatically.
Only used if 'vpc' is supplied.
this
public ProjectProps.Builder subnetSelection(SubnetSelection subnetSelection)
CommonProjectProps.getSubnetSelection()
subnetSelection
- Where to place the network interfaces within the VPC.
Only used if 'vpc' is supplied.this
public ProjectProps.Builder timeout(Duration timeout)
CommonProjectProps.getTimeout()
timeout
- The number of minutes after which AWS CodeBuild stops the build if it's not complete.
For valid values, see the timeoutInMinutes field in the AWS
CodeBuild User Guide.this
public ProjectProps.Builder vpc(IVpc vpc)
CommonProjectProps.getVpc()
vpc
- VPC network to place codebuild network interfaces.
Specify this if the codebuild project needs to access resources in a VPC.this
public ProjectProps build()
ProjectProps
java.lang.NullPointerException
- if any required attribute was not provided