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:
See also: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html
Example
import * as cdk from 'aws-cdk-lib';
import { aws_codebuild as codebuild } from 'aws-cdk-lib';
import { aws_ecr_assets as ecr_assets } from 'aws-cdk-lib';
declare const networkMode: ecr_assets.NetworkMode;
declare const platform: ecr_assets.Platform;
const macBuildImage = codebuild.MacBuildImage.fromAsset(this, 'MyMacBuildImage', {
directory: 'directory',
assetName: 'assetName',
buildArgs: {
buildArgsKey: 'buildArgs',
},
buildSecrets: {
buildSecretsKey: 'buildSecrets',
},
buildSsh: 'buildSsh',
cacheDisabled: false,
cacheFrom: [{
type: 'type',
params: {
paramsKey: 'params',
},
}],
cacheTo: {
type: 'type',
params: {
paramsKey: 'params',
},
},
displayName: 'displayName',
exclude: ['exclude'],
extraHash: 'extraHash',
file: 'file',
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
invalidation: {
buildArgs: false,
buildSecrets: false,
buildSsh: false,
extraHash: false,
file: false,
networkMode: false,
outputs: false,
platform: false,
repositoryName: false,
target: false,
},
networkMode: networkMode,
outputs: ['outputs'],
platform: platform,
target: 'target',
});
Properties Name Type Description defaultComputeType ComputeType
The default ComputeType
to use with this image, if one was not specified in BuildEnvironment#computeType
explicitly. imageId string
The Docker image identifier that the build environment uses. type string
The type of build environment. imagePullPrincipalType? ImagePullPrincipalType
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. secretsManagerCredentials? ISecret
The secretsManagerCredentials for access to a private registry. static BASE_14 IBuildImage
Corresponds to the standard CodeBuild image aws/codebuild/macos-arm-base:14
. defaultComputeType
Type: ComputeType
The default ComputeType
to use with this image, if one was not specified in BuildEnvironment#computeType
explicitly.
Type: string
The Docker image identifier that the build environment uses.
typeType: string
The type of build environment.
imagePullPrincipalType?Type: ImagePullPrincipalType
(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 BASE_14Type: IBuildImage
Corresponds to the standard CodeBuild image aws/codebuild/macos-arm-base:14
.
public runScriptBuildspec(entrypoint: string): BuildSpec
Parameters
string
Returns
Make a buildspec to run the indicated script.
validate(buildEnvironment)public validate(buildEnvironment: BuildEnvironment): string[]
Parameters
BuildEnvironment
Returns
string[]
Allows the image a chance to validate whether the passed configuration is correct.
static fromAsset(scope, id, props)public static fromAsset(scope: Construct, id: string, props: DockerImageAssetProps): IBuildImage
Parameters
Construct
string
DockerImageAssetProps
Returns
Uses an Docker image asset as a ARM MacOS build image.
static fromDockerRegistry(name, options?)public static fromDockerRegistry(name: string, options?: DockerImageOptions): IBuildImage
Parameters
string
DockerImageOptions
Returns
Makes an ARM MacOS build image from a Docker Hub image.
static fromEcrRepository(repository, tagOrDigest?)public static fromEcrRepository(repository: IRepository, tagOrDigest?: string): IBuildImage
Parameters
IRepository
string
Returns
Makes an ARM MacOS build image from an ECR repository.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4