pull/310/head
Frostebite 2021-12-30 22:16:56 +00:00
parent ece36312dc
commit ac933308b9
3 changed files with 5 additions and 5 deletions

4
dist/index.js vendored
View File

@ -2328,7 +2328,7 @@ class KubernetesTaskRunner {
let didStreamAnyLogs = false;
stream._write = (chunk, encoding, next) => {
didStreamAnyLogs = true;
let message = chunk.toString();
let message = chunk.toString().trimRight(`\n`);
message = `[${cloud_runner_statics_1.CloudRunnerStatics.logPrefix}] ${message}`;
if (__1.Input.cloudRunnerTests) {
output += message;
@ -2380,7 +2380,7 @@ class KubernetesTaskRunner {
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(`${(_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}`);
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

@ -22,7 +22,7 @@ class KubernetesTaskRunner {
let didStreamAnyLogs: boolean = false;
stream._write = (chunk, encoding, next) => {
didStreamAnyLogs = true;
let message = chunk.toString();
let message = chunk.toString().trim(`\n`);
message = `[${CloudRunnerStatics.logPrefix}] ${message}`;
if (Input.cloudRunnerTests) {
output += message;
@ -80,7 +80,7 @@ class KubernetesTaskRunner {
const status = await kubeClient.readNamespacedPodStatus(podName, namespace);
const phase = status?.body.status?.phase;
success = phase === 'Running';
CloudRunnerLogger.log(`${status.body.status?.phase} ${status.body.status?.conditions?.[0].message}`);
CloudRunnerLogger.log(`${status.body.status?.phase} ${status.body.status?.conditions?.[0].message || ''}`);
if (success || phase !== 'Pending') return true;
return false;
},