pull/496/head
Frostebite 2023-02-16 19:38:20 +00:00
parent 551b444c42
commit c01f983ad0
2 changed files with 15 additions and 13 deletions

26
dist/index.js generated vendored
View File

@ -4023,13 +4023,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
const client_node_1 = __nccwpck_require__(89679);
const stream_1 = __nccwpck_require__(12781);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const core = __importStar(__nccwpck_require__(42186));
const cloud_runner_statics_1 = __nccwpck_require__(90828);
const async_wait_until_1 = __importDefault(__nccwpck_require__(41299));
const follow_log_stream_service_1 = __nccwpck_require__(64121);
const cloud_runner_system_1 = __nccwpck_require__(99393);
class KubernetesTaskRunner {
static runTask(kubeConfig, kubeClient, jobName, podName, containerName, namespace, alreadyFinished = false) {
var _a;
@ -4081,19 +4081,21 @@ class KubernetesTaskRunner {
*/
// timestamps?: boolean;
// }
const logOptions = {
follow: !alreadyFinished,
pretty: false,
previous: alreadyFinished,
timestamps: true,
sinceSeconds: KubernetesTaskRunner.lastReceivedTimestamp,
};
// const logOptions = {
// follow: !alreadyFinished,
// pretty: false,
// previous: alreadyFinished,
// timestamps: true,
// sinceSeconds: KubernetesTaskRunner.lastReceivedTimestamp,
// };
try {
const resultError = yield new client_node_1.Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
// const resultError = await new Log(kubeConfig).log(namespace, podName, containerName, stream, logOptions);
yield cloud_runner_system_1.CloudRunnerSystem.Run(`kubectl logs ${podName} -c ${containerName} > app.log`);
output += yield cloud_runner_system_1.CloudRunnerSystem.Run(`cat app.log`);
stream.destroy();
if (resultError) {
throw resultError;
}
// if (resultError) {
// throw resultError;
// }
if (!didStreamAnyLogs) {
core.error('Failed to stream any logs, listing namespace events, check for an error with the container');
core.error(JSON.stringify({

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long