hashed logging k8s

This commit is contained in:
Frostebite 2023-09-19 16:37:42 +01:00
parent cc57addcc7
commit df456df645
3 changed files with 1 additions and 5 deletions

BIN
dist/index.js generated vendored

Binary file not shown.

BIN
dist/index.js.map generated vendored

Binary file not shown.

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}`);