Package io.github.cdklabs.projen.gitlab
Class Cache.Builder
- java.lang.Object
-
- io.github.cdklabs.projen.gitlab.Cache.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Cachebuild()Builds the configured instance.Cache.BuilderfallbackKeys(List<String> fallbackKeys)Sets the value ofCache.getFallbackKeys()Cache.Builderkey(CacheKeyFiles key)Sets the value ofCache.getKey()Cache.Builderkey(String key)Sets the value ofCache.getKey()Cache.Builderpaths(List<String> paths)Sets the value ofCache.getPaths()Cache.Builderpolicy(CachePolicy policy)Sets the value ofCache.getPolicy()Cache.Builderuntracked(Boolean untracked)Sets the value ofCache.getUntracked()Cache.Builderwhen(CacheWhen when)Sets the value ofCache.getWhen()
-
-
-
Method Detail
-
fallbackKeys
@Stability(Experimental) public Cache.Builder fallbackKeys(List<String> fallbackKeys)
Sets the value ofCache.getFallbackKeys()- Parameters:
fallbackKeys- Use cache:fallback_keys to specify a list of keys to try to restore cache from if there is no cache found for the cache:key. Caches are retrieved in the order specified in the fallback_keys section.- Returns:
this
-
key
@Stability(Experimental) public Cache.Builder key(String key)
Sets the value ofCache.getKey()- Parameters:
key- Used the to give each cache a unique identifying key. All jobs that use the same cache key use the same cache.- Returns:
this
-
key
@Stability(Experimental) public Cache.Builder key(CacheKeyFiles key)
Sets the value ofCache.getKey()- Parameters:
key- Used the to give each cache a unique identifying key. All jobs that use the same cache key use the same cache.- Returns:
this
-
paths
@Stability(Experimental) public Cache.Builder paths(List<String> paths)
Sets the value ofCache.getPaths()- Parameters:
paths- Defines which files or directories to cache.- Returns:
this
-
policy
@Stability(Experimental) public Cache.Builder policy(CachePolicy policy)
Sets the value ofCache.getPolicy()- Parameters:
policy- Defines the upload and download behaviour of the cache.- Returns:
this
-
untracked
@Stability(Experimental) public Cache.Builder untracked(Boolean untracked)
Sets the value ofCache.getUntracked()- Parameters:
untracked- If set to true all files that are untracked in your Git repository will be cached.- Returns:
this
-
when
@Stability(Experimental) public Cache.Builder when(CacheWhen when)
Sets the value ofCache.getWhen()- Parameters:
when- Defines when to save the cache, based on the status of the job (Default: Job Success).- Returns:
this
-
build
@Stability(Experimental) public Cache build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<Cache>- Returns:
- a new instance of
Cache - Throws:
NullPointerException- if any required attribute was not provided
-
-