Module: AWSCDK::CodeBuild::IBuildImage
- Included in:
- IBindableBuildImage, LinuxArmBuildImage, LinuxArmLambdaBuildImage, LinuxBuildImage, LinuxLambdaBuildImage, MacBuildImage, WindowsBuildImage
- Defined in:
- code_build/i_build_image.rb
Overview
Represents a Docker image used for the CodeBuild Project builds.
Use the concrete subclasses, either:
LinuxBuildImage or WindowsBuildImage.
Class Method Summary collapse
Instance Method Summary collapse
-
#default_compute_type ⇒ AWSCDK::CodeBuild::ComputeType
The default
ComputeTypeto use with this image, if one was not specified inBuildEnvironment#computeTypeexplicitly. -
#image_id ⇒ String
The Docker image identifier that the build environment uses.
-
#image_pull_principal_type ⇒ AWSCDK::CodeBuild::ImagePullPrincipalType?
The type of principal that CodeBuild will use to pull this build Docker image.
-
#repository ⇒ AWSCDK::ECR::IRepository?
An optional ECR repository that the image is hosted in.
-
#run_script_buildspec(entrypoint) ⇒ AWSCDK::CodeBuild::BuildSpec
Make a buildspec to run the indicated script.
-
#secrets_manager_credentials ⇒ AWSCDK::SecretsManager::ISecret?
The secretsManagerCredentials for access to a private registry.
-
#type ⇒ String
The type of build environment.
-
#validate(build_environment) ⇒ Array<String>
Allows the image a chance to validate whether the passed configuration is correct.
Class Method Details
.jsii_overridable_methods ⇒ Object
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'code_build/i_build_image.rb', line 75 def self.jsii_overridable_methods { :default_compute_type => { kind: :property, name: "defaultComputeType", is_optional: false }, :image_id => { kind: :property, name: "imageId", is_optional: false }, :type => { kind: :property, name: "type", is_optional: false }, :image_pull_principal_type => { kind: :property, name: "imagePullPrincipalType", is_optional: true }, :repository => { kind: :property, name: "repository", is_optional: true }, :secrets_manager_credentials => { kind: :property, name: "secretsManagerCredentials", is_optional: true }, :run_script_buildspec => { kind: :method, name: "runScriptBuildspec", is_optional: false }, :validate => { kind: :method, name: "validate", is_optional: false }, } end |
Instance Method Details
#default_compute_type ⇒ AWSCDK::CodeBuild::ComputeType
The default ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.
13 14 15 |
# File 'code_build/i_build_image.rb', line 13 def default_compute_type() jsii_get_property("defaultComputeType") end |
#image_id ⇒ String
The Docker image identifier that the build environment uses.
21 22 23 |
# File 'code_build/i_build_image.rb', line 21 def image_id() jsii_get_property("imageId") end |
#image_pull_principal_type ⇒ AWSCDK::CodeBuild::ImagePullPrincipalType?
Default: ImagePullPrincipalType.SERVICE_ROLE
The type of principal that CodeBuild will use to pull this build Docker image.
36 37 38 |
# File 'code_build/i_build_image.rb', line 36 def image_pull_principal_type() jsii_get_property("imagePullPrincipalType") end |
#repository ⇒ AWSCDK::ECR::IRepository?
Default: no repository
An optional ECR repository that the image is hosted in.
44 45 46 |
# File 'code_build/i_build_image.rb', line 44 def repository() jsii_get_property("repository") end |
#run_script_buildspec(entrypoint) ⇒ AWSCDK::CodeBuild::BuildSpec
Make a buildspec to run the indicated script.
60 61 62 63 |
# File 'code_build/i_build_image.rb', line 60 def run_script_buildspec(entrypoint) Jsii::Type.check_type(entrypoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "entrypoint") jsii_call_method("runScriptBuildspec", [entrypoint]) end |
#secrets_manager_credentials ⇒ AWSCDK::SecretsManager::ISecret?
Default: no credentials will be used
The secretsManagerCredentials for access to a private registry.
52 53 54 |
# File 'code_build/i_build_image.rb', line 52 def secrets_manager_credentials() jsii_get_property("secretsManagerCredentials") end |
#type ⇒ String
The type of build environment.
28 29 30 |
# File 'code_build/i_build_image.rb', line 28 def type() jsii_get_property("type") end |
#validate(build_environment) ⇒ Array<String>
Allows the image a chance to validate whether the passed configuration is correct.
69 70 71 72 73 |
# File 'code_build/i_build_image.rb', line 69 def validate(build_environment) 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") jsii_call_method("validate", [build_environment]) end |