hashed logging k8s

pull/531/head
Frostebite 2023-09-19 16:37:42 +01:00
parent cc57addcc7
commit df456df645
3 changed files with 3 additions and 11 deletions

6
dist/index.js generated vendored
View File

@ -4570,8 +4570,6 @@ const node_fs_1 = __importDefault(__nccwpck_require__(87561));
const node_path_1 = __importDefault(__nccwpck_require__(49411)); const node_path_1 = __importDefault(__nccwpck_require__(49411));
const cloud_runner_1 = __importDefault(__nccwpck_require__(79144)); const cloud_runner_1 = __importDefault(__nccwpck_require__(79144));
const cloud_runner_options_1 = __importDefault(__nccwpck_require__(66965)); const cloud_runner_options_1 = __importDefault(__nccwpck_require__(66965));
const cloud_runner_system_1 = __nccwpck_require__(4197);
const cloud_runner_folders_1 = __nccwpck_require__(77795);
const md5 = __nccwpck_require__(41711); const md5 = __nccwpck_require__(41711);
class RemoteClientLogger { class RemoteClientLogger {
static get LogFilePath() { static get LogFilePath() {
@ -4611,9 +4609,7 @@ class RemoteClientLogger {
return; return;
} }
let hashedLogs = node_fs_1.default.readFileSync(RemoteClientLogger.LogFilePath).toString(); let hashedLogs = node_fs_1.default.readFileSync(RemoteClientLogger.LogFilePath).toString();
process.chdir('/home/'); hashedLogs = md5(hashedLogs);
hashedLogs = await cloud_runner_system_1.CloudRunnerSystem.Run(`md5sum job-log.txt`);
process.chdir(cloud_runner_folders_1.CloudRunnerFolders.projectPathAbsolute);
for (let index = 0; index < 3; index++) { for (let index = 0; index < 3; index++) {
cloud_runner_logger_1.default.log(`LOGHASH: ${hashedLogs}`); cloud_runner_logger_1.default.log(`LOGHASH: ${hashedLogs}`);
const logs = node_fs_1.default.readFileSync(RemoteClientLogger.LogFilePath).toString(); const logs = node_fs_1.default.readFileSync(RemoteClientLogger.LogFilePath).toString();

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -3,8 +3,6 @@ import fs from 'node:fs';
import path from 'node:path'; import path from 'node:path';
import CloudRunner from '../cloud-runner'; import CloudRunner from '../cloud-runner';
import CloudRunnerOptions from '../options/cloud-runner-options'; import CloudRunnerOptions from '../options/cloud-runner-options';
import { CloudRunnerSystem } from '../services/core/cloud-runner-system';
import { CloudRunnerFolders } from '../options/cloud-runner-folders';
const md5 = require('md5'); const md5 = require('md5');
export class RemoteClientLogger { export class RemoteClientLogger {
@ -56,9 +54,7 @@ export class RemoteClientLogger {
let hashedLogs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString(); let hashedLogs = fs.readFileSync(RemoteClientLogger.LogFilePath).toString();
process.chdir('/home/'); hashedLogs = md5(hashedLogs);
hashedLogs = await CloudRunnerSystem.Run(`md5sum job-log.txt`);
process.chdir(CloudRunnerFolders.projectPathAbsolute);
for (let index = 0; index < 3; index++) { for (let index = 0; index < 3; index++) {
CloudRunnerLogger.log(`LOGHASH: ${hashedLogs}`); CloudRunnerLogger.log(`LOGHASH: ${hashedLogs}`);