Skip to content
v2.273.0

IBuildImage Interface ​

Represents a Docker image used for the CodeBuild Project builds.

Use the concrete subclasses, either: LinuxBuildImage or WindowsBuildImage.

Properties ​

defaultComputeTypeComputeTypedefault_compute_typeComputeTypedefaultComputeTypeComputeTypeDefaultComputeTypeComputeTypeDefaultComputeTypeComputeTyperequired#
The default `ComputeType` to use with this image, if one was not specified in `BuildEnvironment#computeType` explicitly.
imageIdstringimage_idstrimageIdStringImageIdstringImageId*stringrequired#
The Docker image identifier that the build environment uses.
imagePullPrincipalTypeImagePullPrincipalTypeimage_pull_principal_typeImagePullPrincipalTypeimagePullPrincipalTypeImagePullPrincipalTypeImagePullPrincipalTypeImagePullPrincipalTypeImagePullPrincipalTypeImagePullPrincipalType= ImagePullPrincipalType.SERVICE_R…#
The type of principal that CodeBuild will use to pull this build Docker image.
default

Default: ImagePullPrincipalType.SERVICE_ROLE

repositoryIRepositoryrepositoryIRepositoryrepositoryIRepositoryRepositoryIRepositoryRepositoryIRepository= no repository#
An optional ECR repository that the image is hosted in.
secretsManagerCredentialsISecretsecrets_manager_credentialsISecretsecretsManagerCredentialsISecretSecretsManagerCredentialsISecretSecretsManagerCredentialsISecret= no credentials will be used#
The secretsManagerCredentials for access to a private registry.
typestringtypestrtypeStringTypestringType*stringrequired#
The type of build environment.

Methods ​

runScriptBuildspec(entrypoint: string): BuildSpecdef run_script_buildspec(self, entrypoint: str) -> BuildSpecpublic BuildSpec runScriptBuildspec(String entrypoint)public BuildSpec RunScriptBuildspec(string entrypoint)func RunScriptBuildspec(Entrypoint *string) BuildSpec#
Make a buildspec to run the indicated script.
validate(buildEnvironment: BuildEnvironment): string[]def validate(self, build_environment: BuildEnvironment) -> typing.List[str]public List<String> validate(BuildEnvironment buildEnvironment)public string[] Validate(BuildEnvironment buildEnvironment)func Validate(BuildEnvironment BuildEnvironment) *[]*string#
Allows the image a chance to validate whether the passed configuration is correct.
1 parameter

Parameters

  • buildEnvironmentbuild_environmentbuildEnvironmentbuildEnvironmentBuildEnvironment — the current build environment.