CmdID / aws / aws codebuild
aws codebuild retry-build
Restarts a build. AWS CLI reference
1 example 2 options Its page in the AWS CLI reference
Examples
To retry a failed build in AWS CodeBuild.
The following retry-build example restarts the specified build.
aws codebuild retry-build --id <project-name>:<build-ID>Identify--idSpecifies the identifier of the build to restart.Its output, shortened
{
"build": {
"id": "<project-name>:<build-ID>",
"arn": "arn:aws:codebuild:<region-ID>:<account-ID>:build/<project-name>:<build-ID>",
"buildNumber": 9,
"startTime": "2020-10-21T17:51:38.161000+00:00",
"currentPhase": "QUEUED",
"buildStatus": "IN_PROGRESS",
"projectName": "<project-name>",
"phases": [
{
"phaseType": "SUBMITTED",
"phaseStatus": "SUCCEEDED",
"startTime": "2020-10-21T17:51:38.161000+00:00",
"endTime": "2020-10-21T17:51:38.210000+00:00",
"durationInSeconds": 0
},
{
"phaseType": "QUEUED",
"startTime": "2020-10-21T17:51:38.210000+00:00"
}
],
"source": {
"type": "GITHUB",
"location": "<GitHub-repo-URL>",
"gitCloneDepth": 1,
"gitSubmodulesConfig": {
"fetchSubmodules": false
},
"reportBuildStatus": false,
… 38 more linesFor more information, see Batch builds in AWS CodeBuild in the AWS CodeBuild User Guide.
Options
--idSpecifies the identifier of the build to restart.--idempotency-tokenA unique, case sensitive identifier you provide to ensure the idempotency of the RetryBuild request.