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