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])
LinuxBuildImage.fromDockerRegistry(image[, { secretsManagerCredentials }])
- See:
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import 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, fleet=None, privileged=None)
Validates by checking the BuildEnvironments’ images are not Lambda ComputeTypes.
- 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 theComputeType
enum for the possible values. Default: taken from#buildImage#defaultComputeType
environment_variables (
Optional
[Mapping
[str
,Union
[BuildEnvironmentVariable
,Dict
[str
,Any
]]]]) – The environment variables that your builds can use.fleet (
Optional
[IFleet
]) – Fleet resource for a reserved capacity CodeBuild project. Fleets allow for process builds or tests to run immediately and reduces build durations, by reserving compute resources for your projects. You will be charged for the resources in the fleet, even if they are idle. Default: - No fleet will be attached to the project, which will remain on-demand.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>
- AMAZON_LINUX_2_STANDARD_3_0 = <aws_cdk.aws_codebuild.LinuxArmBuildImage object>
- default_compute_type
The default
ComputeType
to use with this image, if one was not specified inBuildEnvironment#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:
https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
Example:
"aws/codebuild/amazonlinux2-aarch64-standard:1.0"
- classmethod from_docker_registry(name, *, secrets_manager_credentials=None)
- Parameters:
name (
str
) –secrets_manager_credentials (
Optional
[ISecret
]) – The credentials, stored in Secrets Manager, used for accessing the repository holding the image, if the repository is private. Default: no credentials will be used (we assume the repository is public)
- Return type:
- Returns:
a x86-64 Linux build image from a Docker Hub image.
- 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