IBindableBuildImage

class aws_cdk.aws_codebuild.IBindableBuildImage(*args, **kwds)

Bases: IBuildImage, Protocol

A variant of {@link IBuildImage} that allows binding to the project.

Methods

bind(scope, project)

Function that allows the build image access to the construct tree.

Parameters:
Return type:

BuildImageConfig

run_script_buildspec(entrypoint)

Make a buildspec to run the indicated script.

Parameters:

entrypoint (str) –

Return type:

BuildSpec

validate(*, build_image=None, certificate=None, compute_type=None, environment_variables=None, privileged=None)

Allows the image a chance to validate whether the passed configuration is correct.

Parameters:
  • build_image (Optional[IBuildImage]) – The image used for the builds. Default: LinuxBuildImage.STANDARD_1_0

  • certificate (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 project

  • compute_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

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.

See:

https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

image_pull_principal_type

The type of principal that CodeBuild will use to pull this build Docker image.

Default:

ImagePullPrincipalType.SERVICE_ROLE

repository

An optional ECR repository that the image is hosted in.

Default:

no repository

secrets_manager_credentials

The secretsManagerCredentials for access to a private registry.

Default:

no credentials will be used

type

The type of build environment.