Skip to content

Commit 0642ee5

Browse files
author
awstools
committed
feat(client-codebuild): AWS CodeBuild now supports automatically retrying failed builds
1 parent 5cf2e4b commit 0642ee5

File tree

11 files changed

+169
-1
lines changed

11 files changed

+169
-1
lines changed

clients/client-codebuild/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Guide</a>.</i>
2121

2222
## Installing
2323

24-
To install the this package, simply type add or install @aws-sdk/client-codebuild
24+
To install this package, simply type add or install @aws-sdk/client-codebuild
2525
using your favorite package manager:
2626

2727
- `npm install @aws-sdk/client-codebuild`

clients/client-codebuild/src/commands/BatchGetBuildsCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ export interface BatchGetBuildsCommandOutput extends BatchGetBuildsOutput, __Met
228228
* // sessionTarget: "STRING_VALUE",
229229
* // },
230230
* // buildBatchArn: "STRING_VALUE",
231+
* // autoRetryConfig: { // AutoRetryConfig
232+
* // autoRetryLimit: Number("int"),
233+
* // autoRetryNumber: Number("int"),
234+
* // nextAutoRetry: "STRING_VALUE",
235+
* // previousAutoRetry: "STRING_VALUE",
236+
* // },
231237
* // },
232238
* // ],
233239
* // buildsNotFound: [ // BuildIds

clients/client-codebuild/src/commands/BatchGetProjectsCommand.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ export interface BatchGetProjectsCommandOutput extends BatchGetProjectsOutput, _
238238
* // projectVisibility: "PUBLIC_READ" || "PRIVATE",
239239
* // publicProjectAlias: "STRING_VALUE",
240240
* // resourceAccessRole: "STRING_VALUE",
241+
* // autoRetryLimit: Number("int"),
241242
* // },
242243
* // ],
243244
* // projectsNotFound: [ // ProjectNames

clients/client-codebuild/src/commands/CreateProjectCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
197197
* batchReportMode: "REPORT_INDIVIDUAL_BUILDS" || "REPORT_AGGREGATED_BATCH",
198198
* },
199199
* concurrentBuildLimit: Number("int"),
200+
* autoRetryLimit: Number("int"),
200201
* };
201202
* const command = new CreateProjectCommand(input);
202203
* const response = await client.send(command);
@@ -395,6 +396,7 @@ export interface CreateProjectCommandOutput extends CreateProjectOutput, __Metad
395396
* // projectVisibility: "PUBLIC_READ" || "PRIVATE",
396397
* // publicProjectAlias: "STRING_VALUE",
397398
* // resourceAccessRole: "STRING_VALUE",
399+
* // autoRetryLimit: Number("int"),
398400
* // },
399401
* // };
400402
*

clients/client-codebuild/src/commands/RetryBuildCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,12 @@ export interface RetryBuildCommandOutput extends RetryBuildOutput, __MetadataBea
226226
* // sessionTarget: "STRING_VALUE",
227227
* // },
228228
* // buildBatchArn: "STRING_VALUE",
229+
* // autoRetryConfig: { // AutoRetryConfig
230+
* // autoRetryLimit: Number("int"),
231+
* // autoRetryNumber: Number("int"),
232+
* // nextAutoRetry: "STRING_VALUE",
233+
* // previousAutoRetry: "STRING_VALUE",
234+
* // },
229235
* // },
230236
* // };
231237
*

clients/client-codebuild/src/commands/StartBuildCommand.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
158158
* fleetOverride: { // ProjectFleet
159159
* fleetArn: "STRING_VALUE",
160160
* },
161+
* autoRetryLimitOverride: Number("int"),
161162
* };
162163
* const command = new StartBuildCommand(input);
163164
* const response = await client.send(command);
@@ -346,6 +347,12 @@ export interface StartBuildCommandOutput extends StartBuildOutput, __MetadataBea
346347
* // sessionTarget: "STRING_VALUE",
347348
* // },
348349
* // buildBatchArn: "STRING_VALUE",
350+
* // autoRetryConfig: { // AutoRetryConfig
351+
* // autoRetryLimit: Number("int"),
352+
* // autoRetryNumber: Number("int"),
353+
* // nextAutoRetry: "STRING_VALUE",
354+
* // previousAutoRetry: "STRING_VALUE",
355+
* // },
349356
* // },
350357
* // };
351358
*

clients/client-codebuild/src/commands/StopBuildCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ export interface StopBuildCommandOutput extends StopBuildOutput, __MetadataBeare
225225
* // sessionTarget: "STRING_VALUE",
226226
* // },
227227
* // buildBatchArn: "STRING_VALUE",
228+
* // autoRetryConfig: { // AutoRetryConfig
229+
* // autoRetryLimit: Number("int"),
230+
* // autoRetryNumber: Number("int"),
231+
* // nextAutoRetry: "STRING_VALUE",
232+
* // previousAutoRetry: "STRING_VALUE",
233+
* // },
228234
* // },
229235
* // };
230236
*

clients/client-codebuild/src/commands/UpdateProjectCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
197197
* batchReportMode: "REPORT_INDIVIDUAL_BUILDS" || "REPORT_AGGREGATED_BATCH",
198198
* },
199199
* concurrentBuildLimit: Number("int"),
200+
* autoRetryLimit: Number("int"),
200201
* };
201202
* const command = new UpdateProjectCommand(input);
202203
* const response = await client.send(command);
@@ -395,6 +396,7 @@ export interface UpdateProjectCommandOutput extends UpdateProjectOutput, __Metad
395396
* // projectVisibility: "PUBLIC_READ" || "PRIVATE",
396397
* // publicProjectAlias: "STRING_VALUE",
397398
* // resourceAccessRole: "STRING_VALUE",
399+
* // autoRetryLimit: Number("int"),
398400
* // },
399401
* // };
400402
*

clients/client-codebuild/src/models/models_0.ts

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,40 @@ export const AuthType = {
8383
*/
8484
export type AuthType = (typeof AuthType)[keyof typeof AuthType];
8585

86+
/**
87+
* <p>Information about the auto-retry configuration for the build.</p>
88+
* @public
89+
*/
90+
export interface AutoRetryConfig {
91+
/**
92+
* <p>The maximum number of additional automatic retries after a failed build. For example, if the
93+
* auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically
94+
* retry your build for up to 2 additional times.</p>
95+
* @public
96+
*/
97+
autoRetryLimit?: number;
98+
99+
/**
100+
* <p>The number of times that the build has been retried. The initial build will have an auto-retry number of 0.</p>
101+
* @public
102+
*/
103+
autoRetryNumber?: number;
104+
105+
/**
106+
* <p>The build ARN of the auto-retried build triggered by the current build. The next auto-retry
107+
* will be <code>null</code> for builds that don't trigger an auto-retry.</p>
108+
* @public
109+
*/
110+
nextAutoRetry?: string;
111+
112+
/**
113+
* <p>The build ARN of the build that triggered the current auto-retry build. The previous auto-retry will be
114+
* <code>null</code> for the initial build.</p>
115+
* @public
116+
*/
117+
previousAutoRetry?: string;
118+
}
119+
86120
/**
87121
* @public
88122
*/
@@ -2686,6 +2720,12 @@ export interface Build {
26862720
* @public
26872721
*/
26882722
buildBatchArn?: string;
2723+
2724+
/**
2725+
* <p>Information about the auto-retry configuration for the build.</p>
2726+
* @public
2727+
*/
2728+
autoRetryConfig?: AutoRetryConfig;
26892729
}
26902730

26912731
/**
@@ -4140,6 +4180,14 @@ export interface Project {
41404180
* @public
41414181
*/
41424182
resourceAccessRole?: string;
4183+
4184+
/**
4185+
* <p>The maximum number of additional automatic retries after a failed build. For example, if the
4186+
* auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically
4187+
* retry your build for up to 2 additional times.</p>
4188+
* @public
4189+
*/
4190+
autoRetryLimit?: number;
41434191
}
41444192

41454193
/**
@@ -5089,6 +5137,14 @@ export interface CreateProjectInput {
50895137
* @public
50905138
*/
50915139
concurrentBuildLimit?: number;
5140+
5141+
/**
5142+
* <p>The maximum number of additional automatic retries after a failed build. For example, if the
5143+
* auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically
5144+
* retry your build for up to 2 additional times.</p>
5145+
* @public
5146+
*/
5147+
autoRetryLimit?: number;
50925148
}
50935149

50945150
/**
@@ -7528,6 +7584,14 @@ export interface StartBuildInput {
75287584
* @public
75297585
*/
75307586
fleetOverride?: ProjectFleet;
7587+
7588+
/**
7589+
* <p>The maximum number of additional automatic retries after a failed build. For example, if the
7590+
* auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically
7591+
* retry your build for up to 2 additional times.</p>
7592+
* @public
7593+
*/
7594+
autoRetryLimitOverride?: number;
75317595
}
75327596

75337597
/**
@@ -8280,6 +8344,14 @@ export interface UpdateProjectInput {
82808344
* @public
82818345
*/
82828346
concurrentBuildLimit?: number;
8347+
8348+
/**
8349+
* <p>The maximum number of additional automatic retries after a failed build. For example, if the
8350+
* auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically
8351+
* retry your build for up to 2 additional times.</p>
8352+
* @public
8353+
*/
8354+
autoRetryLimit?: number;
82838355
}
82848356

82858357
/**

clients/client-codebuild/src/protocols/Aws_json1_1.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2294,6 +2294,8 @@ const se_UpdateFleetInput = (input: UpdateFleetInput, context: __SerdeContext):
22942294

22952295
// de_AccountLimitExceededException omitted.
22962296

2297+
// de_AutoRetryConfig omitted.
2298+
22972299
// de_BatchDeleteBuildsOutput omitted.
22982300

22992301
/**
@@ -2365,6 +2367,7 @@ const de_Build = (output: any, context: __SerdeContext): Build => {
23652367
return take(output, {
23662368
arn: __expectString,
23672369
artifacts: _json,
2370+
autoRetryConfig: _json,
23682371
buildBatchArn: __expectString,
23692372
buildComplete: __expectBoolean,
23702373
buildNumber: __expectLong,
@@ -2833,6 +2836,7 @@ const de_Project = (output: any, context: __SerdeContext): Project => {
28332836
return take(output, {
28342837
arn: __expectString,
28352838
artifacts: _json,
2839+
autoRetryLimit: __expectInt32,
28362840
badge: _json,
28372841
buildBatchConfig: _json,
28382842
cache: _json,

0 commit comments

Comments
 (0)