Show / Hide Table of Contents

Class LocalCacheMode

Local cache modes to enable for the CodeBuild Project.

Inheritance
System.Object
LocalCacheMode
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.AWS.CodeBuild.dll
Syntax (csharp)
public sealed class LocalCacheMode : Enum
Syntax (vb)
Public NotInheritable Class LocalCacheMode
    Inherits

     Enum
Remarks

ExampleMetadata: infused

Examples
new Project(this, "Project", new ProjectProps {
    Source = Source.GitHubEnterprise(new GitHubEnterpriseSourceProps {
        HttpsCloneUrl = "https://my-github-enterprise.com/owner/repo"
    }),

    // Enable Docker AND custom caching
    Cache = Cache.Local(LocalCacheMode.DOCKER_LAYER, LocalCacheMode.CUSTOM),

    // BuildSpec with a 'cache' section necessary for 'CUSTOM' caching. This can
    // also come from 'buildspec.yml' in your source.
    BuildSpec = BuildSpec.FromObject(new Dictionary<string, object> {
        { "version", "0.2" },
        { "phases", new Dictionary<string, IDictionary<string, string[]>> {
            { "build", new Struct {
                Commands = new [] { "..." }
            } }
        } },
        { "cache", new Dictionary<string, string[]> {
            { "paths", new [] { "/root/cachedir/**/*" } }
        } }
    })
});

Synopsis

Fields

CUSTOM

Caches directories you specify in the buildspec file.

DOCKER_LAYER

Caches existing Docker layers.

SOURCE

Caches Git metadata for primary and secondary sources.

value__

Fields

CUSTOM

Caches directories you specify in the buildspec file.

public const LocalCacheMode CUSTOM
Field Value
Type Description
LocalCacheMode

DOCKER_LAYER

Caches existing Docker layers.

public const LocalCacheMode DOCKER_LAYER
Field Value
Type Description
LocalCacheMode

SOURCE

Caches Git metadata for primary and secondary sources.

public const LocalCacheMode SOURCE
Field Value
Type Description
LocalCacheMode

value__

public int value__
Field Value
Type Description
System.Int32
Back to top Generated by DocFX