Fix: log all pvc info
parent
2718db7a0f
commit
70e4968320
|
|
@ -1545,6 +1545,7 @@ class Kubernetes {
|
||||||
yield this.cleanup();
|
yield this.cleanup();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
|
core.info('Running job failed');
|
||||||
yield this.cleanup();
|
yield this.cleanup();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
@ -1653,9 +1654,15 @@ class Kubernetes {
|
||||||
cleanup() {
|
cleanup() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
core.info('cleaning up');
|
core.info('cleaning up');
|
||||||
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
try {
|
||||||
yield this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace);
|
yield this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
||||||
yield this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace);
|
yield this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace);
|
||||||
|
yield this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace);
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
core.info('Failed to cleanup');
|
||||||
|
core.error(JSON.stringify(error, undefined, 4));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static uuidv4() {
|
static uuidv4() {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -329,6 +329,7 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
||||||
await this.streamLogs();
|
await this.streamLogs();
|
||||||
await this.cleanup();
|
await this.cleanup();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
core.info('Running job failed');
|
||||||
await this.cleanup();
|
await this.cleanup();
|
||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
|
|
@ -436,9 +437,14 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
||||||
|
|
||||||
async cleanup() {
|
async cleanup() {
|
||||||
core.info('cleaning up');
|
core.info('cleaning up');
|
||||||
await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
try {
|
||||||
await this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace);
|
await this.kubeClientBatch.deleteNamespacedJob(this.jobName, this.namespace);
|
||||||
await this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace);
|
await this.kubeClient.deleteNamespacedPersistentVolumeClaim(this.pvcName, this.namespace);
|
||||||
|
await this.kubeClient.deleteNamespacedSecret(this.secretName, this.namespace);
|
||||||
|
} catch (error) {
|
||||||
|
core.info('Failed to cleanup');
|
||||||
|
core.error(JSON.stringify(error, undefined, 4));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static uuidv4() {
|
static uuidv4() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue