LinuxArmBuildImage
- class aws_cdk.aws_codebuild.LinuxArmBuildImage(*args: Any, **kwargs)
Bases:
object
A CodeBuild image running aarch64 Linux.
This class has a bunch of public constants that represent the CodeBuild ARM images.
You can also specify a custom image using the static method:
LinuxBuildImage.fromEcrRepository(repo[, tag])
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_codebuild as codebuild linux_arm_build_image = codebuild.LinuxArmBuildImage.from_code_build_image_id("id")
Methods
- run_script_buildspec(entrypoint)
Make a buildspec to run the indicated script.
- Parameters:
entrypoint (
str
)- Return type:
- validate(*, build_image=None, certificate=None, compute_type=None, environment_variables=None, privileged=None)
Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE.
- Parameters:
build_image (
Optional
[IBuildImage
]) – The image used for the builds. Default: LinuxBuildImage.STANDARD_1_0certificate (
Union
[BuildEnvironmentCertificate
,Dict
[str
,Any
],None
]) – The location of the PEM-encoded certificate for the build project. Default: - No external certificate is added to the projectcompute_type (
Optional
[ComputeType
]) – The type of compute to use for this build. See the {@link ComputeType} enum for the possible values. Default: taken from {@link #buildImage#defaultComputeType}environment_variables (
Optional
[Mapping
[str
,Union
[BuildEnvironmentVariable
,Dict
[str
,Any
]]]]) – The environment variables that your builds can use.privileged (
Optional
[bool
]) – Indicates how the project builds Docker images. Specify true to enable running the Docker daemon inside a Docker container. This value must be set to true only if this build project will be used to build Docker images, and the specified build environment image is not one provided by AWS CodeBuild with Docker support. Otherwise, all associated builds that attempt to interact with the Docker daemon will fail. Default: false
- Return type:
List
[str
]
Attributes
- AMAZON_LINUX_2_STANDARD_1_0 = <aws_cdk.aws_codebuild.LinuxArmBuildImage object>
- AMAZON_LINUX_2_STANDARD_2_0 = <aws_cdk.aws_codebuild.LinuxArmBuildImage object>
- default_compute_type
The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly.
- image_id
The Docker image identifier that the build environment uses.
- image_pull_principal_type
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.
- secrets_manager_credentials
The secretsManagerCredentials for access to a private registry.
- type
The type of build environment.
Static Methods
- classmethod from_code_build_image_id(id)
Uses a Docker image provided by CodeBuild.
- Parameters:
id (
str
) – The image identifier.- Return type:
- Returns:
A Docker image provided by CodeBuild.
- See:
Example:
"aws/codebuild/amazonlinux2-aarch64-standard:1.0"
- classmethod from_ecr_repository(repository, tag_or_digest=None)
Returns an ARM image running Linux from an ECR repository.
NOTE: if the repository is external (i.e. imported), then we won’t be able to add a resource policy statement for it so CodeBuild can pull the image.
- Parameters:
repository (
IRepository
) – The ECR repository.tag_or_digest (
Optional
[str
]) – Image tag or digest (default “latest”, digests must start withsha256:
).
- Return type:
- Returns:
An aarch64 Linux build image from an ECR repository.
- See:
https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html