Cleanup pipelines

pull/310/head
Frostebite 2021-12-30 03:20:02 +00:00
parent f07b46eb7d
commit 26c15cbb76
3 changed files with 4 additions and 4 deletions

4
dist/index.js vendored
View File

@ -2355,11 +2355,11 @@ class KubernetesTaskRunner {
let success = false;
cloud_runner_logger_1.default.log(`Watching ${podName} ${namespace}`);
yield async_wait_until_1.default(() => __awaiter(this, void 0, void 0, function* () {
var _a;
var _a, _b, _c, _d;
const status = yield kubeClient.readNamespacedPodStatus(podName, namespace);
const phase = (_a = status === null || status === void 0 ? void 0 : status.body.status) === null || _a === void 0 ? void 0 : _a.phase;
success = phase === 'Running';
cloud_runner_logger_1.default.log(`${JSON.stringify(status.body.status, undefined, 4)}`);
cloud_runner_logger_1.default.log(`${(_b = status.body.status) === null || _b === void 0 ? void 0 : _b.phase} ${(_d = (_c = status.body.status) === null || _c === void 0 ? void 0 : _c.conditions) === null || _d === void 0 ? void 0 : _d[0].message}`);
if (success || phase !== 'Pending')
return true;
return false;

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -79,7 +79,7 @@ class KubernetesTaskRunner {
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
const phase = status?.body.status?.phase;
success = phase === 'Running';
CloudRunnerLogger.log(`${JSON.stringify(status.body.status, undefined, 4)}`);
CloudRunnerLogger.log(`${status.body.status?.phase} ${status.body.status?.conditions?.[0].message}`);
if (success || phase !== 'Pending') return true;
return false;
},