Class: AWSCDK::Pipelines::CodeBuildOptions
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Pipelines::CodeBuildOptions
- Defined in:
- pipelines/code_build_options.rb
Overview
Options for customizing a single CodeBuild project.
Instance Attribute Summary collapse
-
#build_environment ⇒ AWSCDK::CodeBuild::BuildEnvironment?
readonly
Partial build environment, will be combined with other build environments that apply.
-
#cache ⇒ AWSCDK::CodeBuild::Cache?
readonly
Caching strategy to use.
-
#file_system_locations ⇒ Array<AWSCDK::CodeBuild::IFileSystemLocation>?
readonly
ProjectFileSystemLocation objects for CodeBuild build projects.
-
#logging ⇒ AWSCDK::CodeBuild::LoggingOptions?
readonly
Information about logs for CodeBuild projects.
-
#partial_build_spec ⇒ AWSCDK::CodeBuild::BuildSpec?
readonly
Partial buildspec, will be combined with other buildspecs that apply.
-
#role_policy ⇒ Array<AWSCDK::IAM::PolicyStatement>?
readonly
Policy statements to add to role.
-
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>?
readonly
Which security group(s) to associate with the project network interfaces.
-
#subnet_selection ⇒ AWSCDK::EC2::SubnetSelection?
readonly
Which subnets to use.
-
#timeout ⇒ AWSCDK::Duration?
readonly
The number of minutes after which AWS CodeBuild stops the build if it's not complete.
-
#vpc ⇒ AWSCDK::EC2::IVPC?
readonly
The VPC where to create the CodeBuild network interfaces in.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(build_environment: nil, cache: nil, file_system_locations: nil, logging: nil, partial_build_spec: nil, role_policy: nil, security_groups: nil, subnet_selection: nil, timeout: nil, vpc: nil) ⇒ CodeBuildOptions
constructor
A new instance of CodeBuildOptions.
- #to_jsii ⇒ Object
Constructor Details
#initialize(build_environment: nil, cache: nil, file_system_locations: nil, logging: nil, partial_build_spec: nil, role_policy: nil, security_groups: nil, subnet_selection: nil, timeout: nil, vpc: nil) ⇒ CodeBuildOptions
Returns a new instance of CodeBuildOptions.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
# File 'pipelines/code_build_options.rb', line 17 def initialize(build_environment: nil, cache: nil, file_system_locations: nil, logging: nil, partial_build_spec: nil, role_policy: nil, security_groups: nil, subnet_selection: nil, timeout: nil, vpc: nil) @build_environment = build_environment.is_a?(Hash) ? ::AWSCDK::CodeBuild::BuildEnvironment.new(**build_environment.transform_keys(&:to_sym)) : build_environment Jsii::Type.check_type(@build_environment, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkJ1aWxkRW52aXJvbm1lbnQifQ==")), "buildEnvironment") unless @build_environment.nil? @cache = cache Jsii::Type.check_type(@cache, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkNhY2hlIn0=")), "cache") unless @cache.nil? @file_system_locations = file_system_locations Jsii::Type.check_type(@file_system_locations, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2RlYnVpbGQuSUZpbGVTeXN0ZW1Mb2NhdGlvbiJ9LCJraW5kIjoiYXJyYXkifX0=")), "fileSystemLocations") unless @file_system_locations.nil? @logging = logging.is_a?(Hash) ? ::AWSCDK::CodeBuild::LoggingOptions.new(**logging.transform_keys(&:to_sym)) : logging Jsii::Type.check_type(@logging, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkxvZ2dpbmdPcHRpb25zIn0=")), "logging") unless @logging.nil? @partial_build_spec = partial_build_spec Jsii::Type.check_type(@partial_build_spec, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkJ1aWxkU3BlYyJ9")), "partialBuildSpec") unless @partial_build_spec.nil? @role_policy = role_policy Jsii::Type.check_type(@role_policy, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19pYW0uUG9saWN5U3RhdGVtZW50In0sImtpbmQiOiJhcnJheSJ9fQ==")), "rolePolicy") unless @role_policy.nil? @security_groups = security_groups Jsii::Type.check_type(@security_groups, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19lYzIuSVNlY3VyaXR5R3JvdXAifSwia2luZCI6ImFycmF5In19")), "securityGroups") unless @security_groups.nil? @subnet_selection = subnet_selection.is_a?(Hash) ? ::AWSCDK::EC2::SubnetSelection.new(**subnet_selection.transform_keys(&:to_sym)) : subnet_selection Jsii::Type.check_type(@subnet_selection, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLlN1Ym5ldFNlbGVjdGlvbiJ9")), "subnetSelection") unless @subnet_selection.nil? @timeout = timeout Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "timeout") unless @timeout.nil? @vpc = vpc Jsii::Type.check_type(@vpc, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWMyLklWcGMifQ==")), "vpc") unless @vpc.nil? end |
Instance Attribute Details
#build_environment ⇒ AWSCDK::CodeBuild::BuildEnvironment? (readonly)
Default: - Non-privileged build, SMALL instance, LinuxBuildImage.STANDARD_7_0
Partial build environment, will be combined with other build environments that apply.
44 45 46 |
# File 'pipelines/code_build_options.rb', line 44 def build_environment @build_environment end |
#cache ⇒ AWSCDK::CodeBuild::Cache? (readonly)
Default: - No cache
Caching strategy to use.
49 50 51 |
# File 'pipelines/code_build_options.rb', line 49 def cache @cache end |
#file_system_locations ⇒ Array<AWSCDK::CodeBuild::IFileSystemLocation>? (readonly)
Default: - no file system locations
ProjectFileSystemLocation objects for CodeBuild build projects.
A ProjectFileSystemLocation object specifies the identifier, location, mountOptions, mountPoint, and type of a file system created using Amazon Elastic File System. Requires a vpc to be set and privileged to be set to true.
58 59 60 |
# File 'pipelines/code_build_options.rb', line 58 def file_system_locations @file_system_locations end |
#logging ⇒ AWSCDK::CodeBuild::LoggingOptions? (readonly)
Default: - no log configuration is set
Information about logs for CodeBuild projects.
A CodeBuild project can create logs in Amazon CloudWatch Logs, an S3 bucket, or both.
65 66 67 |
# File 'pipelines/code_build_options.rb', line 65 def logging @logging end |
#partial_build_spec ⇒ AWSCDK::CodeBuild::BuildSpec? (readonly)
Default: - No initial BuildSpec
Partial buildspec, will be combined with other buildspecs that apply.
The BuildSpec must be available inline--it cannot reference a file on disk.
73 74 75 |
# File 'pipelines/code_build_options.rb', line 73 def partial_build_spec @partial_build_spec end |
#role_policy ⇒ Array<AWSCDK::IAM::PolicyStatement>? (readonly)
Default: - No policy statements added to CodeBuild Project Role
Policy statements to add to role.
78 79 80 |
# File 'pipelines/code_build_options.rb', line 78 def role_policy @role_policy end |
#security_groups ⇒ Array<AWSCDK::EC2::ISecurityGroup>? (readonly)
Default: - Security group will be automatically created.
Which security group(s) to associate with the project network interfaces.
Only used if 'vpc' is supplied.
85 86 87 |
# File 'pipelines/code_build_options.rb', line 85 def security_groups @security_groups end |
#subnet_selection ⇒ AWSCDK::EC2::SubnetSelection? (readonly)
Default: - All private subnets.
Which subnets to use.
Only used if 'vpc' is supplied.
92 93 94 |
# File 'pipelines/code_build_options.rb', line 92 def subnet_selection @subnet_selection end |
#timeout ⇒ AWSCDK::Duration? (readonly)
Default: Duration.hours(1)
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.
100 101 102 |
# File 'pipelines/code_build_options.rb', line 100 def timeout @timeout end |
#vpc ⇒ AWSCDK::EC2::IVPC? (readonly)
Default: - No VPC
The VPC where to create the CodeBuild network interfaces in.
105 106 107 |
# File 'pipelines/code_build_options.rb', line 105 def vpc @vpc end |
Class Method Details
.jsii_properties ⇒ Object
107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'pipelines/code_build_options.rb', line 107 def self.jsii_properties { :build_environment => "buildEnvironment", :cache => "cache", :file_system_locations => "fileSystemLocations", :logging => "logging", :partial_build_spec => "partialBuildSpec", :role_policy => "rolePolicy", :security_groups => "securityGroups", :subnet_selection => "subnetSelection", :timeout => "timeout", :vpc => "vpc", } end |
Instance Method Details
#to_jsii ⇒ Object
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'pipelines/code_build_options.rb', line 122 def to_jsii result = {} result.merge!({ "buildEnvironment" => @build_environment, "cache" => @cache, "fileSystemLocations" => @file_system_locations, "logging" => @logging, "partialBuildSpec" => @partial_build_spec, "rolePolicy" => @role_policy, "securityGroups" => @security_groups, "subnetSelection" => @subnet_selection, "timeout" => @timeout, "vpc" => @vpc, }) result.compact end |