Show / Hide Table of Contents

Class MacBuildImage

A CodeBuild image running ARM MacOS.

Inheritance
object
MacBuildImage
Implements
IBuildImage
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class MacBuildImage : DeputyBase, IBuildImage
Syntax (vb)
Public Class MacBuildImage Inherits DeputyBase Implements IBuildImage
Remarks

This class has a bunch of public constants that represent the most popular images.

You can also specify a custom image using one of the static methods:

    See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

    ExampleMetadata: fixture=_generated

    Examples
    // The code below shows an example of how to instantiate this type.
                 // The values are placeholders you should change.
                 using Amazon.CDK;
                 using Amazon.CDK.AWS.CodeBuild;
                 using Amazon.CDK.AWS.Ecr.Assets;
    
                 NetworkMode networkMode;
                 Platform platform;
    
                 var macBuildImage = MacBuildImage.FromAsset(this, "MyMacBuildImage", new DockerImageAssetProps {
                     Directory = "directory",
    
                     // the properties below are optional
                     AssetName = "assetName",
                     BuildArgs = new Dictionary<string, string> {
                         { "buildArgsKey", "buildArgs" }
                     },
                     BuildContexts = new Dictionary<string, string> {
                         { "buildContextsKey", "buildContexts" }
                     },
                     BuildSecrets = new Dictionary<string, string> {
                         { "buildSecretsKey", "buildSecrets" }
                     },
                     BuildSsh = "buildSsh",
                     CacheDisabled = false,
                     CacheFrom = new [] { new DockerCacheOption {
                         Type = "type",
    
                         // the properties below are optional
                         Params = new Dictionary<string, string> {
                             { "paramsKey", "params" }
                         }
                     } },
                     CacheTo = new DockerCacheOption {
                         Type = "type",
    
                         // the properties below are optional
                         Params = new Dictionary<string, string> {
                             { "paramsKey", "params" }
                         }
                     },
                     DisplayName = "displayName",
                     Exclude = new [] { "exclude" },
                     ExtraHash = "extraHash",
                     File = "file",
                     FollowSymlinks = SymlinkFollowMode.NEVER,
                     IgnoreMode = IgnoreMode.GLOB,
                     Invalidation = new DockerImageAssetInvalidationOptions {
                         BuildArgs = false,
                         BuildContexts = false,
                         BuildSecrets = false,
                         BuildSsh = false,
                         ExtraHash = false,
                         File = false,
                         NetworkMode = false,
                         Outputs = false,
                         Platform = false,
                         RepositoryName = false,
                         Target = false
                     },
                     NetworkMode = networkMode,
                     Outputs = new [] { "outputs" },
                     Platform = platform,
                     Target = "target"
                 });

    Synopsis

    Properties

    BASE_14

    Corresponds to the standard CodeBuild image aws/codebuild/macos-arm-base:14.

    BASE_15

    Corresponds to the CodeBuild image aws/codebuild/macos-arm-base:15.

    BASE_26

    Corresponds to the CodeBuild image aws/codebuild/macos-arm-base:26.

    DefaultComputeType

    The default ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.

    ImageId

    The Docker image identifier that the build environment uses.

    ImagePullPrincipalType

    The type of principal that CodeBuild will use to pull this build Docker image.

    Repository

    An optional ECR repository that the image is hosted in.

    SecretsManagerCredentials

    The secretsManagerCredentials for access to a private registry.

    Type

    The type of build environment.

    Methods

    FromAsset(Construct, string, IDockerImageAssetProps)

    Uses an Docker image asset as a ARM MacOS build image.

    FromDockerRegistry(string, IDockerImageOptions?)

    Makes an ARM MacOS build image from a Docker Hub image.

    FromEcrRepository(IRepository, string?)

    Makes an ARM MacOS build image from an ECR repository.

    RunScriptBuildspec(string)

    Make a buildspec to run the indicated script.

    Validate(IBuildEnvironment)

    Allows the image a chance to validate whether the passed configuration is correct.

    Properties

    BASE_14

    Corresponds to the standard CodeBuild image aws/codebuild/macos-arm-base:14.

    public static IBuildImage BASE_14 { get; }
    Property Value

    IBuildImage

    Remarks

    This class has a bunch of public constants that represent the most popular images.

    You can also specify a custom image using one of the static methods:

      See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

      ExampleMetadata: fixture=_generated

      BASE_15

      Corresponds to the CodeBuild image aws/codebuild/macos-arm-base:15.

      public static IBuildImage BASE_15 { get; }
      Property Value

      IBuildImage

      Remarks

      This class has a bunch of public constants that represent the most popular images.

      You can also specify a custom image using one of the static methods:

        See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

        ExampleMetadata: fixture=_generated

        BASE_26

        Corresponds to the CodeBuild image aws/codebuild/macos-arm-base:26.

        public static IBuildImage BASE_26 { get; }
        Property Value

        IBuildImage

        Remarks

        This class has a bunch of public constants that represent the most popular images.

        You can also specify a custom image using one of the static methods:

          See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

          ExampleMetadata: fixture=_generated

          DefaultComputeType

          The default ComputeType to use with this image, if one was not specified in BuildEnvironment#computeType explicitly.

          public virtual ComputeType DefaultComputeType { get; }
          Property Value

          ComputeType

          Remarks

          This class has a bunch of public constants that represent the most popular images.

          You can also specify a custom image using one of the static methods:

            See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

            ExampleMetadata: fixture=_generated

            ImageId

            The Docker image identifier that the build environment uses.

            public virtual string ImageId { get; }
            Property Value

            string

            Remarks

            This class has a bunch of public constants that represent the most popular images.

            You can also specify a custom image using one of the static methods:

              See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

              ExampleMetadata: fixture=_generated

              ImagePullPrincipalType

              The type of principal that CodeBuild will use to pull this build Docker image.

              public virtual ImagePullPrincipalType? ImagePullPrincipalType { get; }
              Property Value

              ImagePullPrincipalType?

              Remarks

              This class has a bunch of public constants that represent the most popular images.

              You can also specify a custom image using one of the static methods:

                See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                ExampleMetadata: fixture=_generated

                Repository

                An optional ECR repository that the image is hosted in.

                public virtual IRepository? Repository { get; }
                Property Value

                IRepository

                Remarks

                This class has a bunch of public constants that represent the most popular images.

                You can also specify a custom image using one of the static methods:

                  See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                  ExampleMetadata: fixture=_generated

                  SecretsManagerCredentials

                  The secretsManagerCredentials for access to a private registry.

                  public virtual ISecret? SecretsManagerCredentials { get; }
                  Property Value

                  ISecret

                  Remarks

                  This class has a bunch of public constants that represent the most popular images.

                  You can also specify a custom image using one of the static methods:

                    See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                    ExampleMetadata: fixture=_generated

                    Type

                    The type of build environment.

                    public virtual string Type { get; }
                    Property Value

                    string

                    Remarks

                    This class has a bunch of public constants that represent the most popular images.

                    You can also specify a custom image using one of the static methods:

                      See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                      ExampleMetadata: fixture=_generated

                      Methods

                      FromAsset(Construct, string, IDockerImageAssetProps)

                      Uses an Docker image asset as a ARM MacOS build image.

                      public static IBuildImage FromAsset(Construct scope, string id, IDockerImageAssetProps props)
                      Parameters
                      scope Construct
                      id string
                      props IDockerImageAssetProps
                      Returns

                      IBuildImage

                      Remarks

                      This class has a bunch of public constants that represent the most popular images.

                      You can also specify a custom image using one of the static methods:

                        See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                        ExampleMetadata: fixture=_generated

                        FromDockerRegistry(string, IDockerImageOptions?)

                        Makes an ARM MacOS build image from a Docker Hub image.

                        public static IBuildImage FromDockerRegistry(string name, IDockerImageOptions? options = null)
                        Parameters
                        name string
                        options IDockerImageOptions
                        Returns

                        IBuildImage

                        Remarks

                        This class has a bunch of public constants that represent the most popular images.

                        You can also specify a custom image using one of the static methods:

                          See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                          ExampleMetadata: fixture=_generated

                          FromEcrRepository(IRepository, string?)

                          Makes an ARM MacOS build image from an ECR repository.

                          public static IBuildImage FromEcrRepository(IRepository repository, string? tagOrDigest = null)
                          Parameters
                          repository IRepository
                          tagOrDigest string
                          Returns

                          IBuildImage

                          Remarks

                          This class has a bunch of public constants that represent the most popular images.

                          You can also specify a custom image using one of the static methods:

                            See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                            ExampleMetadata: fixture=_generated

                            RunScriptBuildspec(string)

                            Make a buildspec to run the indicated script.

                            public virtual BuildSpec RunScriptBuildspec(string entrypoint)
                            Parameters
                            entrypoint string
                            Returns

                            BuildSpec

                            Remarks

                            This class has a bunch of public constants that represent the most popular images.

                            You can also specify a custom image using one of the static methods:

                              See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                              ExampleMetadata: fixture=_generated

                              Validate(IBuildEnvironment)

                              Allows the image a chance to validate whether the passed configuration is correct.

                              public virtual string[] Validate(IBuildEnvironment buildEnvironment)
                              Parameters
                              buildEnvironment IBuildEnvironment
                              Returns

                              string[]

                              Remarks

                              This class has a bunch of public constants that represent the most popular images.

                              You can also specify a custom image using one of the static methods:

                                See: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

                                ExampleMetadata: fixture=_generated

                                Implements

                                IBuildImage
                                Back to top Generated by DocFX