Class: AWSCDK::CodeBuild::Cache

Inherits:
Jsii::Object
  • Object
show all
Defined in:
code_build/cache.rb

Overview

Cache options for CodeBuild Project.

A cache can store reusable pieces of your build environment and use them across multiple builds.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCache

Returns a new instance of Cache.



12
13
14
# File 'code_build/cache.rb', line 12

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.bucket(bucket, options = nil) ⇒ AWSCDK::CodeBuild::Cache

Create an S3 caching strategy.

Parameters:

Returns:

  • (AWSCDK::CodeBuild::Cache)


26
27
28
29
30
31
# File 'code_build/cache.rb', line 26

def self.bucket(bucket, options = nil)
  Jsii::Type.check_type(bucket, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfczMuSUJ1Y2tldCJ9")), "bucket")
  options = options.is_a?(Hash) ? ::AWSCDK::CodeBuild::BucketCacheOptions.new(**options.transform_keys(&:to_sym)) : options
  Jsii::Type.check_type(options, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkJ1Y2tldENhY2hlT3B0aW9ucyJ9")), "options") unless options.nil?
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.Cache", "bucket", [bucket, options])
end

.jsii_overridable_methodsObject



16
17
18
19
# File 'code_build/cache.rb', line 16

def self.jsii_overridable_methods
  {
  }
end

.local(*modes) ⇒ AWSCDK::CodeBuild::Cache

Create a local caching strategy.

Parameters:

Returns:

  • (AWSCDK::CodeBuild::Cache)


37
38
39
40
41
42
# File 'code_build/cache.rb', line 37

def self.local(*modes)
  modes.each_with_index do |item, index|
    Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29kZWJ1aWxkLkxvY2FsQ2FjaGVNb2RlIn0=")), "modes[#{index}]")
  end
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.Cache", "local", [*modes])
end

.noneAWSCDK::CodeBuild::Cache

Returns:

  • (AWSCDK::CodeBuild::Cache)


45
46
47
# File 'code_build/cache.rb', line 45

def self.none()
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_codebuild.Cache", "none", [])
end