Fix: error handling
parent
d0402e14b1
commit
3430d9b1f8
|
|
@ -803,6 +803,7 @@ class Kubernetes {
|
||||||
// run
|
// run
|
||||||
yield this.runCloneJob();
|
yield this.runCloneJob();
|
||||||
yield this.runBuildJob();
|
yield this.runBuildJob();
|
||||||
|
yield this.cleanup();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.error(JSON.stringify(error.response.body, undefined, 4));
|
core.error(JSON.stringify(error.response.body, undefined, 4));
|
||||||
|
|
@ -998,10 +999,8 @@ class Kubernetes {
|
||||||
yield this.streamLogs();
|
yield this.streamLogs();
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
yield this.cleanup();
|
yield this.cleanup();
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -89,6 +89,8 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
||||||
// run
|
// run
|
||||||
await this.runCloneJob();
|
await this.runCloneJob();
|
||||||
await this.runBuildJob();
|
await this.runBuildJob();
|
||||||
|
|
||||||
|
await this.cleanup();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.error(JSON.stringify(error.response.body, undefined, 4));
|
core.error(JSON.stringify(error.response.body, undefined, 4));
|
||||||
throw error;
|
throw error;
|
||||||
|
|
@ -280,9 +282,8 @@ class Kubernetes implements RemoteBuilderProviderInterface {
|
||||||
await this.watchUntilPodRunning();
|
await this.watchUntilPodRunning();
|
||||||
await this.streamLogs();
|
await this.streamLogs();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw error;
|
|
||||||
} finally {
|
|
||||||
await this.cleanup();
|
await this.cleanup();
|
||||||
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue