start_build_batch
¶
start_build_batch(
project_name: NonEmptyString,
*,
config_overrides: Optional[CodeBuildClientConfig] = None,
secondary_sources_override: Optional[ProjectSources] = None,
secondary_sources_version_override: Optional[ProjectSecondarySourceVersions] = None,
source_version: Optional[String] = None,
artifacts_override: Optional[ProjectArtifacts] = None,
secondary_artifacts_override: Optional[ProjectArtifactsList] = None,
environment_variables_override: Optional[EnvironmentVariables] = None,
source_type_override: Optional[SourceType] = None,
source_location_override: Optional[String] = None,
source_auth_override: Optional[SourceAuth] = None,
git_clone_depth_override: Optional[GitCloneDepth] = None,
git_submodules_config_override: Optional[GitSubmodulesConfig] = None,
buildspec_override: Optional[String] = None,
insecure_ssl_override: Optional[WrapperBoolean] = None,
report_build_batch_status_override: Optional[WrapperBoolean] = None,
environment_type_override: Optional[EnvironmentType] = None,
image_override: Optional[NonEmptyString] = None,
compute_type_override: Optional[ComputeType] = None,
certificate_override: Optional[String] = None,
cache_override: Optional[ProjectCache] = None,
service_role_override: Optional[NonEmptyString] = None,
privileged_mode_override: Optional[WrapperBoolean] = None,
build_timeout_in_minutes_override: Optional[BuildTimeOut] = None,
queued_timeout_in_minutes_override: Optional[TimeOut] = None,
encryption_key_override: Optional[NonEmptyString] = None,
idempotency_token: Optional[String] = None,
logs_config_override: Optional[LogsConfig] = None,
registry_credential_override: Optional[RegistryCredential] = None,
image_pull_credentials_type_override: Optional[ImagePullCredentialsType] = None,
build_batch_config_override: Optional[ProjectBuildBatchConfig] = None,
debug_session_enabled: Optional[WrapperBoolean] = None,
) -> StartBuildBatchOutput
Starts a batch build for a project.
Parameters:
-
project_name(NonEmptyString) –The name of the project.
-
secondary_sources_override(Optional[ProjectSources], default:None) –An array of
ProjectSourceobjects that override the secondary sources defined in the batch build project. -
secondary_sources_version_override(Optional[ProjectSecondarySourceVersions], default:None) –An array of
ProjectSourceVersionobjects that override the secondary source versions in the batch build project. -
source_version(Optional[String], default:None) –The version of the batch build input to be built, for this build only. If not specified, the latest version is used. If specified, the contents depends on the source provider:
- CodeCommit
-
The commit ID, branch, or Git tag to use.
- GitHub
-
The commit ID, pull request ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a pull request ID is specified, it must use the format
pr/pull-request-ID(for examplepr/25). If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used. - Bitbucket
-
The commit ID, branch name, or tag name that corresponds to the version of the source code you want to build. If a branch name is specified, the branch's HEAD commit ID is used. If not specified, the default branch's HEAD commit ID is used.
- Amazon S3
-
The version ID of the object that represents the build input ZIP file to use.
If
sourceVersionis specified at the project level, then thissourceVersion(at the build level) takes precedence.For more information, see Source Version Sample with CodeBuild in the CodeBuild User Guide.
-
artifacts_override(Optional[ProjectArtifacts], default:None) –An array of
ProjectArtifactsobjects that contains information about the build output artifact overrides for the build project. -
secondary_artifacts_override(Optional[ProjectArtifactsList], default:None) –An array of
ProjectArtifactsobjects that override the secondary artifacts defined in the batch build project. -
environment_variables_override(Optional[EnvironmentVariables], default:None) –An array of
EnvironmentVariableobjects that override, or add to, the environment variables defined in the batch build project. -
source_type_override(Optional[SourceType], default:None) –The source input type that overrides the source input defined in the batch build project.
-
source_location_override(Optional[String], default:None) –A location that overrides, for this batch build, the source location defined in the batch build project.
-
source_auth_override(Optional[SourceAuth], default:None) –A
SourceAuthobject that overrides the one defined in the batch build project. This override applies only if the build project's source is BitBucket or GitHub. -
git_clone_depth_override(Optional[GitCloneDepth], default:None) –The user-defined depth of history, with a minimum value of 0, that overrides, for this batch build only, any previous depth of history defined in the batch build project.
-
git_submodules_config_override(Optional[GitSubmodulesConfig], default:None) –A
GitSubmodulesConfigobject that overrides the Git submodules configuration for this batch build. -
buildspec_override(Optional[String], default:None) –A buildspec file declaration that overrides, for this build only, the latest one already defined in the build project.
If this value is set, it can be either an inline buildspec definition, the path to an alternate buildspec file relative to the value of the built-in
CODEBUILD_SRC_DIRenvironment variable, or the path to an S3 bucket. The bucket must be in the same Amazon Web Services Region as the build project. Specify the buildspec file using its ARN (for example,arn:aws:s3:::my-codebuild-sample2/buildspec.yml). If this value is not provided or is set to an empty string, the source code must contain a buildspec file in its root directory. For more information, see Buildspec File Name and Storage Location. -
insecure_ssl_override(Optional[WrapperBoolean], default:None) –Enable this flag to override the insecure SSL setting that is specified in the batch build project. The insecure SSL setting determines whether to ignore SSL warnings while connecting to the project source code. This override applies only if the build's source is GitHub Enterprise.
-
report_build_batch_status_override(Optional[WrapperBoolean], default:None) –Set to
trueto report to your source provider the status of a batch build's start and completion. If you use this option with a source provider other than GitHub, GitHub Enterprise, or Bitbucket, aninvalidInputExceptionis thrown.The status of a build triggered by a webhook is always reported to your source provider.
-
environment_type_override(Optional[EnvironmentType], default:None) –A container type for this batch build that overrides the one specified in the batch build project.
-
image_override(Optional[NonEmptyString], default:None) –The name of an image for this batch build that overrides the one specified in the batch build project.
-
compute_type_override(Optional[ComputeType], default:None) –The name of a compute type for this batch build that overrides the one specified in the batch build project.
-
certificate_override(Optional[String], default:None) –The name of a certificate for this batch build that overrides the one specified in the batch build project.
-
cache_override(Optional[ProjectCache], default:None) –A
ProjectCacheobject that specifies cache overrides. -
service_role_override(Optional[NonEmptyString], default:None) –The name of a service role for this batch build that overrides the one specified in the batch build project.
-
privileged_mode_override(Optional[WrapperBoolean], default:None) –Enable this flag to override privileged mode in the batch build project.
-
build_timeout_in_minutes_override(Optional[BuildTimeOut], default:None) –Overrides the build timeout specified in the batch build project.
-
queued_timeout_in_minutes_override(Optional[TimeOut], default:None) –The number of minutes a batch build is allowed to be queued before it times out.
-
encryption_key_override(Optional[NonEmptyString], default:None) –The Key Management Service customer master key (CMK) that overrides the one specified in the batch build project. The CMK key encrypts the build output artifacts.
You can use a cross-account KMS key to encrypt the build output artifacts if your service role has permission to that key.
You can specify either the Amazon Resource Name (ARN) of the CMK or, if available, the CMK's alias (using the format
alias/). -
idempotency_token(Optional[String], default:None) –A unique, case sensitive identifier you provide to ensure the idempotency of the
StartBuildBatchrequest. The token is included in theStartBuildBatchrequest and is valid for five minutes. If you repeat theStartBuildBatchrequest with the same token, but change a parameter, CodeBuild returns a parameter mismatch error. -
logs_config_override(Optional[LogsConfig], default:None) –A
LogsConfigobject that override the log settings defined in the batch build project. -
registry_credential_override(Optional[RegistryCredential], default:None) –A
RegistryCredentialobject that overrides credentials for access to a private registry. -
image_pull_credentials_type_override(Optional[ImagePullCredentialsType], default:None) –The type of credentials CodeBuild uses to pull images in your batch build. There are two valid values:
- CODEBUILD
-
Specifies that CodeBuild uses its own credentials. This requires that you modify your ECR repository policy to trust CodeBuild's service principal.
- SERVICE_ROLE
-
Specifies that CodeBuild uses your build project's service role.
When using a cross-account or private registry image, you must use
SERVICE_ROLEcredentials. When using an CodeBuild curated image, you must useCODEBUILDcredentials. -
build_batch_config_override(Optional[ProjectBuildBatchConfig], default:None) –A
BuildBatchConfigOverrideobject that contains batch build configuration overrides. -
debug_session_enabled(Optional[WrapperBoolean], default:None) –Specifies if session debugging is enabled for this batch build. For more information, see Viewing a running build in Session Manager. Batch session debugging is not supported for matrix batch builds.
Raises:
-
InvalidInputException–The input value that was provided is not valid.
-
ResourceNotFoundException–The specified Amazon Web Services resource cannot be found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_codebuild/_services/code_build.py
4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 | |