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

+1-1
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

+6
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

+1
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

+2
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

+6
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

+7
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

+6
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

+2
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

+72
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

+4
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,

codegen/sdk-codegen/aws-models/codebuild.json

+62
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,38 @@
133133
}
134134
}
135135
},
136+
"com.amazonaws.codebuild#AutoRetryConfig": {
137+
"type": "structure",
138+
"members": {
139+
"autoRetryLimit": {
140+
"target": "com.amazonaws.codebuild#WrapperInt",
141+
"traits": {
142+
"smithy.api#documentation": "<p>The maximum number of additional automatic retries after a failed build. For example, if the \n auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically \n retry your build for up to 2 additional times.</p>"
143+
}
144+
},
145+
"autoRetryNumber": {
146+
"target": "com.amazonaws.codebuild#WrapperInt",
147+
"traits": {
148+
"smithy.api#documentation": "<p>The number of times that the build has been retried. The initial build will have an auto-retry number of 0.</p>"
149+
}
150+
},
151+
"nextAutoRetry": {
152+
"target": "com.amazonaws.codebuild#String",
153+
"traits": {
154+
"smithy.api#documentation": "<p>The build ARN of the auto-retried build triggered by the current build. The next auto-retry \n will be <code>null</code> for builds that don't trigger an auto-retry.</p>"
155+
}
156+
},
157+
"previousAutoRetry": {
158+
"target": "com.amazonaws.codebuild#String",
159+
"traits": {
160+
"smithy.api#documentation": "<p>The build ARN of the build that triggered the current auto-retry build. The previous auto-retry will be \n <code>null</code> for the initial build.</p>"
161+
}
162+
}
163+
},
164+
"traits": {
165+
"smithy.api#documentation": "<p>Information about the auto-retry configuration for the build.</p>"
166+
}
167+
},
136168
"com.amazonaws.codebuild#BatchDeleteBuilds": {
137169
"type": "operation",
138170
"input": {
@@ -761,6 +793,12 @@
761793
"traits": {
762794
"smithy.api#documentation": "<p>The ARN of the batch build that this build is a member of, if applicable.</p>"
763795
}
796+
},
797+
"autoRetryConfig": {
798+
"target": "com.amazonaws.codebuild#AutoRetryConfig",
799+
"traits": {
800+
"smithy.api#documentation": "<p>Information about the auto-retry configuration for the build.</p>"
801+
}
764802
}
765803
},
766804
"traits": {
@@ -3101,6 +3139,12 @@
31013139
"traits": {
31023140
"smithy.api#documentation": "<p>The maximum number of concurrent builds that are allowed for this project.</p>\n <p>New builds are only started if the current number of builds is less than or equal to this limit. \n If the current build count meets this limit, new builds are throttled and are not run.</p>"
31033141
}
3142+
},
3143+
"autoRetryLimit": {
3144+
"target": "com.amazonaws.codebuild#WrapperInt",
3145+
"traits": {
3146+
"smithy.api#documentation": "<p>The maximum number of additional automatic retries after a failed build. For example, if the \n auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically \n retry your build for up to 2 additional times.</p>"
3147+
}
31043148
}
31053149
},
31063150
"traits": {
@@ -6175,6 +6219,12 @@
61756219
"traits": {
61766220
"smithy.api#documentation": "<p>The ARN of the IAM role that enables CodeBuild to access the CloudWatch Logs and Amazon S3 artifacts for\n the project's builds.</p>"
61776221
}
6222+
},
6223+
"autoRetryLimit": {
6224+
"target": "com.amazonaws.codebuild#WrapperInt",
6225+
"traits": {
6226+
"smithy.api#documentation": "<p>The maximum number of additional automatic retries after a failed build. For example, if the \n auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically \n retry your build for up to 2 additional times.</p>"
6227+
}
61786228
}
61796229
},
61806230
"traits": {
@@ -8297,6 +8347,12 @@
82978347
"traits": {
82988348
"smithy.api#documentation": "<p>A ProjectFleet object specified for this build that overrides the one defined in the\n build project.</p>"
82998349
}
8350+
},
8351+
"autoRetryLimitOverride": {
8352+
"target": "com.amazonaws.codebuild#WrapperInt",
8353+
"traits": {
8354+
"smithy.api#documentation": "<p>The maximum number of additional automatic retries after a failed build. For example, if the \n auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically \n retry your build for up to 2 additional times.</p>"
8355+
}
83008356
}
83018357
},
83028358
"traits": {
@@ -8904,6 +8960,12 @@
89048960
"traits": {
89058961
"smithy.api#documentation": "<p>The maximum number of concurrent builds that are allowed for this project.</p>\n <p>New builds are only started if the current number of builds is less than or equal to this limit. \n If the current build count meets this limit, new builds are throttled and are not run.</p>\n <p>To remove this limit, set this value to -1.</p>"
89068962
}
8963+
},
8964+
"autoRetryLimit": {
8965+
"target": "com.amazonaws.codebuild#WrapperInt",
8966+
"traits": {
8967+
"smithy.api#documentation": "<p>The maximum number of additional automatic retries after a failed build. For example, if the \n auto-retry limit is set to 2, CodeBuild will call the <code>RetryBuild</code> API to automatically \n retry your build for up to 2 additional times.</p>"
8968+
}
89078969
}
89088970
},
89098971
"traits": {

0 commit comments

Comments
 (0)