timeout adjusted
parent
01a4a23e00
commit
78272271a6
|
|
@ -3117,15 +3117,13 @@ class Kubernetes {
|
||||||
cleanupTaskResources() {
|
cleanupTaskResources() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
cloud_runner_logger_1.default.log('cleaning up');
|
cloud_runner_logger_1.default.log('cleaning up');
|
||||||
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
|
||||||
try {
|
try {
|
||||||
|
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
||||||
yield this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
|
yield this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
if (error.response.body.reason !== `NotFound`) {
|
if (error.response.body.reason !== `NotFound`) {
|
||||||
cloud_runner_logger_1.default.log('Failed to cleanup, error:');
|
cloud_runner_logger_1.default.log(`Failed to cleanup, error: ${error.response.body.reason}`);
|
||||||
core.error(JSON.stringify(error, undefined, 4));
|
|
||||||
cloud_runner_logger_1.default.log('Abandoning cleanup, build error:');
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -215,14 +215,12 @@ class Kubernetes implements ProviderInterface {
|
||||||
|
|
||||||
async cleanupTaskResources() {
|
async cleanupTaskResources() {
|
||||||
CloudRunnerLogger.log('cleaning up');
|
CloudRunnerLogger.log('cleaning up');
|
||||||
await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
|
||||||
try {
|
try {
|
||||||
|
await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
||||||
await this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
|
await this.kubeClient.deleteNamespacedPod(this.podName, this.namespace);
|
||||||
} catch (error: any) {
|
} catch (error: any) {
|
||||||
if (error.response.body.reason !== `NotFound`) {
|
if (error.response.body.reason !== `NotFound`) {
|
||||||
CloudRunnerLogger.log('Failed to cleanup, error:');
|
CloudRunnerLogger.log(`Failed to cleanup, error: ${error.response.body.reason}`);
|
||||||
core.error(JSON.stringify(error, undefined, 4));
|
|
||||||
CloudRunnerLogger.log('Abandoning cleanup, build error:');
|
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue