Class: AWSCDK::CodeBuild::BuildSpec
- Inherits:
-
Jsii::Object
- Object
- Jsii::Object
- AWSCDK::CodeBuild::BuildSpec
- Defined in:
- code_build/build_spec.rb
Overview
BuildSpec for CodeBuild projects.
Class Method Summary collapse
-
.from_asset(path) ⇒ AWSCDK::CodeBuild::BuildSpec
Use the contents of a local file as the build spec string.
- .from_object(value) ⇒ AWSCDK::CodeBuild::BuildSpec
-
.from_object_to_yaml(value) ⇒ AWSCDK::CodeBuild::BuildSpec
Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.
-
.from_source_filename(filename) ⇒ AWSCDK::CodeBuild::BuildSpec
Use a file from the source as buildspec.
- .jsii_overridable_methods ⇒ Object
Instance Method Summary collapse
-
#initialize ⇒ BuildSpec
constructor
A new instance of BuildSpec.
-
#is_immediate ⇒ Boolean
Whether the buildspec is directly available or deferred until build-time.
-
#to_build_spec(scope = nil) ⇒ String
Render the represented BuildSpec.
Constructor Details
#initialize ⇒ BuildSpec
Returns a new instance of BuildSpec.
8 9 10 |
# File 'code_build/build_spec.rb', line 8 def initialize Jsii::Object.instance_method(:initialize).bind(self).call end |
Class Method Details
.from_asset(path) ⇒ AWSCDK::CodeBuild::BuildSpec
Use the contents of a local file as the build spec string.
Use this if you have a local .yml or .json file that you want to use as the buildspec
25 26 27 28 |
# File 'code_build/build_spec.rb', line 25 def self.from_asset(path) Jsii::Type.check_type(path, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "path") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.BuildSpec", "fromAsset", [path]) end |
.from_object(value) ⇒ AWSCDK::CodeBuild::BuildSpec
32 33 34 35 |
# File 'code_build/build_spec.rb', line 32 def self.from_object(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.BuildSpec", "fromObject", [value]) end |
.from_object_to_yaml(value) ⇒ AWSCDK::CodeBuild::BuildSpec
Create a buildspec from an object that will be rendered as YAML in the resulting CloudFormation template.
41 42 43 44 |
# File 'code_build/build_spec.rb', line 41 def self.from_object_to_yaml(value) Jsii::Type.check_type(value, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "value") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.BuildSpec", "fromObjectToYaml", [value]) end |
.from_source_filename(filename) ⇒ AWSCDK::CodeBuild::BuildSpec
Use a file from the source as buildspec.
Use this if you want to use a file different from 'buildspec.yml'`
52 53 54 55 |
# File 'code_build/build_spec.rb', line 52 def self.from_source_filename(filename) Jsii::Type.check_type(filename, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "filename") Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.BuildSpec", "fromSourceFilename", [filename]) end |
.jsii_overridable_methods ⇒ Object
12 13 14 15 16 17 |
# File 'code_build/build_spec.rb', line 12 def self.jsii_overridable_methods { :is_immediate => { kind: :property, name: "isImmediate", is_optional: false }, :to_build_spec => { kind: :method, name: "toBuildSpec", is_optional: false }, } end |
Instance Method Details
#is_immediate ⇒ Boolean
Whether the buildspec is directly available or deferred until build-time.
60 61 62 |
# File 'code_build/build_spec.rb', line 60 def is_immediate() jsii_get_property("isImmediate") end |
#to_build_spec(scope = nil) ⇒ String
Render the represented BuildSpec.
68 69 70 71 |
# File 'code_build/build_spec.rb', line 68 def to_build_spec(scope = nil) Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") unless scope.nil? jsii_call_method("toBuildSpec", [scope]) end |