class LinuxArmBuildImage
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.CodeBuild.LinuxArmBuildImage |
Java | software.amazon.awscdk.services.codebuild.LinuxArmBuildImage |
Python | aws_cdk.aws_codebuild.LinuxArmBuildImage |
TypeScript (source) | @aws-cdk/aws-codebuild » LinuxArmBuildImage |
Implements
IBuild
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])
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as codebuild from '@aws-cdk/aws-codebuild';
const linuxArmBuildImage = codebuild.LinuxArmBuildImage.fromCodeBuildImageId('id');
Properties
Name | Type | Description |
---|---|---|
default | Compute | The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly. |
image | string | The Docker image identifier that the build environment uses. |
type | string | The type of build environment. |
image | Image | The type of principal that CodeBuild will use to pull this build Docker image. |
repository? | IRepository | An optional ECR repository that the image is hosted in. |
secrets | ISecret | The secretsManagerCredentials for access to a private registry. |
static AMAZON_LINUX_2_STANDARD_1_0 | IBuild | Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0". |
static AMAZON_LINUX_2_STANDARD_2_0 | IBuild | Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0". |
defaultComputeType
Type:
Compute
The default {@link ComputeType} to use with this image, if one was not specified in {@link BuildEnvironment#computeType} explicitly.
imageId
Type:
string
The Docker image identifier that the build environment uses.
type
Type:
string
The type of build environment.
imagePullPrincipalType?
Type:
Image
(optional)
The type of principal that CodeBuild will use to pull this build Docker image.
repository?
Type:
IRepository
(optional)
An optional ECR repository that the image is hosted in.
secretsManagerCredentials?
Type:
ISecret
(optional)
The secretsManagerCredentials for access to a private registry.
static AMAZON_LINUX_2_STANDARD_1_0
Type:
IBuild
Image "aws/codebuild/amazonlinux2-aarch64-standard:1.0".
static AMAZON_LINUX_2_STANDARD_2_0
Type:
IBuild
Image "aws/codebuild/amazonlinux2-aarch64-standard:2.0".
Methods
Name | Description |
---|---|
run | Make a buildspec to run the indicated script. |
validate(buildEnvironment) | Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE. |
static from | Uses a Docker image provided by CodeBuild. |
static from | Returns an ARM image running Linux from an ECR repository. |
ScriptBuildspec(entrypoint)
runpublic runScriptBuildspec(entrypoint: string): BuildSpec
Parameters
- entrypoint
string
Returns
Make a buildspec to run the indicated script.
validate(buildEnvironment)
public validate(buildEnvironment: BuildEnvironment): string[]
Parameters
- buildEnvironment
Build
— BuildEnvironment.Environment
Returns
string[]
Validates by checking the BuildEnvironment computeType as aarch64 images only support ComputeType.SMALL and ComputeType.LARGE.
CodeBuildImageId(id)
static frompublic static fromCodeBuildImageId(id: string): IBuildImage
Parameters
- id
string
— The image identifier.
Returns
Uses a Docker image provided by CodeBuild.
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html Example
'aws/codebuild/amazonlinux2-aarch64-standard:1.0'
EcrRepository(repository, tagOrDigest?)
static frompublic static fromEcrRepository(repository: IRepository, tagOrDigest?: string): IBuildImage
Parameters
- repository
IRepository
— The ECR repository. - tagOrDigest
string
— Image tag or digest (default "latest", digests must start withsha256:
).
Returns
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.
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/sample-ecr.html