Class MacBuildImage
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.codebuild.MacBuildImage
- All Implemented Interfaces:
IBuildImage
,software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-15T10:24:56.402Z")
@Stability(Stable)
public class MacBuildImage
extends software.amazon.jsii.JsiiObject
implements IBuildImage
A CodeBuild image running ARM MacOS.
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:
- MacBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }])
- MacBuildImage.fromEcrRepository(repo[, tag])
- MacBuildImage.fromAsset(parent, id, props)
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.*; import software.amazon.awscdk.services.codebuild.*; import software.amazon.awscdk.services.ecr.assets.*; NetworkMode networkMode; Platform platform; IBuildImage macBuildImage = MacBuildImage.fromAsset(this, "MyMacBuildImage", DockerImageAssetProps.builder() .directory("directory") // the properties below are optional .assetName("assetName") .buildArgs(Map.of( "buildArgsKey", "buildArgs")) .buildSecrets(Map.of( "buildSecretsKey", "buildSecrets")) .buildSsh("buildSsh") .cacheDisabled(false) .cacheFrom(List.of(DockerCacheOption.builder() .type("type") // the properties below are optional .params(Map.of( "paramsKey", "params")) .build())) .cacheTo(DockerCacheOption.builder() .type("type") // the properties below are optional .params(Map.of( "paramsKey", "params")) .build()) .exclude(List.of("exclude")) .extraHash("extraHash") .file("file") .followSymlinks(SymlinkFollowMode.NEVER) .ignoreMode(IgnoreMode.GLOB) .invalidation(DockerImageAssetInvalidationOptions.builder() .buildArgs(false) .buildSecrets(false) .buildSsh(false) .extraHash(false) .file(false) .networkMode(false) .outputs(false) .platform(false) .repositoryName(false) .target(false) .build()) .networkMode(networkMode) .outputs(List.of("outputs")) .platform(platform) .target("target") .build());
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.codebuild.IBuildImage
IBuildImage.Jsii$Default, IBuildImage.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IBuildImage
Corresponds to the standard CodeBuild imageaws/codebuild/macos-arm-base:14
. -
Constructor Summary
ModifierConstructorDescriptionprotected
MacBuildImage
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
MacBuildImage
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic IBuildImage
fromAsset
(software.constructs.Construct scope, String id, DockerImageAssetProps props) Uses an Docker image asset as a ARM MacOS build image.static IBuildImage
fromDockerRegistry
(String name) Makes an ARM MacOS build image from a Docker Hub image.static IBuildImage
fromDockerRegistry
(String name, DockerImageOptions options) Makes an ARM MacOS build image from a Docker Hub image.static IBuildImage
fromEcrRepository
(IRepository repository) Makes an ARM MacOS build image from an ECR repository.static IBuildImage
fromEcrRepository
(IRepository repository, String tagOrDigest) Makes an ARM MacOS build image from an ECR repository.The defaultComputeType
to use with this image, if one was not specified inBuildEnvironment#computeType
explicitly.The Docker image identifier that the build environment uses.The type of principal that CodeBuild will use to pull this build Docker image.An optional ECR repository that the image is hosted in.The secretsManagerCredentials for access to a private registry.getType()
The type of build environment.runScriptBuildspec
(String entrypoint) Make a buildspec to run the indicated script.validate
(BuildEnvironment buildEnvironment) Allows the image a chance to validate whether the passed configuration is correct.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
BASE_14
Corresponds to the standard CodeBuild imageaws/codebuild/macos-arm-base:14
.
-
-
Constructor Details
-
MacBuildImage
protected MacBuildImage(software.amazon.jsii.JsiiObjectRef objRef) -
MacBuildImage
protected MacBuildImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
fromAsset
@Stability(Stable) @NotNull public static IBuildImage fromAsset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull DockerImageAssetProps props) Uses an Docker image asset as a ARM MacOS build image.- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
- This parameter is required.
-
fromDockerRegistry
@Stability(Stable) @NotNull public static IBuildImage fromDockerRegistry(@NotNull String name, @Nullable DockerImageOptions options) Makes an ARM MacOS build image from a Docker Hub image.- Parameters:
name
- This parameter is required.options
-
-
fromDockerRegistry
Makes an ARM MacOS build image from a Docker Hub image.- Parameters:
name
- This parameter is required.
-
fromEcrRepository
@Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository, @Nullable String tagOrDigest) Makes an ARM MacOS build image from an ECR repository.- Parameters:
repository
- This parameter is required.tagOrDigest
-
-
fromEcrRepository
@Stability(Stable) @NotNull public static IBuildImage fromEcrRepository(@NotNull IRepository repository) Makes an ARM MacOS build image from an ECR repository.- Parameters:
repository
- This parameter is required.
-
runScriptBuildspec
Make a buildspec to run the indicated script.- Specified by:
runScriptBuildspec
in interfaceIBuildImage
- Parameters:
entrypoint
- This parameter is required.
-
validate
@Stability(Stable) @NotNull public List<String> validate(@NotNull BuildEnvironment buildEnvironment) Allows the image a chance to validate whether the passed configuration is correct.- Specified by:
validate
in interfaceIBuildImage
- Parameters:
buildEnvironment
- This parameter is required.
-
getDefaultComputeType
The defaultComputeType
to use with this image, if one was not specified inBuildEnvironment#computeType
explicitly.- Specified by:
getDefaultComputeType
in interfaceIBuildImage
-
getImageId
The Docker image identifier that the build environment uses.- Specified by:
getImageId
in interfaceIBuildImage
- See Also:
-
getType
The type of build environment.- Specified by:
getType
in interfaceIBuildImage
-
getImagePullPrincipalType
The type of principal that CodeBuild will use to pull this build Docker image.- Specified by:
getImagePullPrincipalType
in interfaceIBuildImage
-
getRepository
An optional ECR repository that the image is hosted in.- Specified by:
getRepository
in interfaceIBuildImage
-
getSecretsManagerCredentials
The secretsManagerCredentials for access to a private registry.- Specified by:
getSecretsManagerCredentials
in interfaceIBuildImage
-