test retain workspace first

pull/437/head
Frostebite 2022-11-02 21:52:23 +00:00
parent 6bcb5f2bdc
commit 20a40d7f47
3 changed files with 17 additions and 6 deletions

8
dist/index.js vendored
View File

@ -3049,7 +3049,7 @@ class Kubernetes {
}); });
} }
runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) { runTaskInWorkflow(buildGuid, image, commands, mountdir, workingdir, environment, secrets) {
var _a, _b; var _a, _b, _c, _d;
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
try { try {
cloud_runner_logger_1.default.log('Cloud Runner K8s workflow!'); cloud_runner_logger_1.default.log('Cloud Runner K8s workflow!');
@ -3080,10 +3080,16 @@ class Kubernetes {
} }
} }
catch (error) { catch (error) {
const reason = ((_d = (_c = error.response) === null || _c === void 0 ? void 0 : _c.body) === null || _d === void 0 ? void 0 : _d.reason) || ``;
if (reason === `NotFound`) {
cloud_runner_logger_1.default.log('Log Stream Container Not Found');
}
else {
cloud_runner_logger_1.default.log(`error running k8s workflow ${error}`); cloud_runner_logger_1.default.log(`error running k8s workflow ${error}`);
throw error; throw error;
} }
} }
}
yield this.cleanupTaskResources(); yield this.cleanupTaskResources();
return output; return output;
} }

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -162,10 +162,15 @@ class Kubernetes implements ProviderInterface {
CloudRunnerLogger.log('Pod still running, recovering stream...'); CloudRunnerLogger.log('Pod still running, recovering stream...');
} }
} catch (error: any) { } catch (error: any) {
const reason = error.response?.body?.reason || ``;
if (reason === `NotFound`) {
CloudRunnerLogger.log('Log Stream Container Not Found');
} else {
CloudRunnerLogger.log(`error running k8s workflow ${error}`); CloudRunnerLogger.log(`error running k8s workflow ${error}`);
throw error; throw error;
} }
} }
}
await this.cleanupTaskResources(); await this.cleanupTaskResources();
return output; return output;