stream logs through standard input and new remote client cli command
parent
79ddbbd8b6
commit
fdde0dec58
|
|
@ -4297,6 +4297,7 @@ const yaml_1 = __importDefault(__nccwpck_require__(44603));
|
||||||
const github_1 = __importDefault(__nccwpck_require__(39789));
|
const github_1 = __importDefault(__nccwpck_require__(39789));
|
||||||
const build_parameters_1 = __importDefault(__nccwpck_require__(80787));
|
const build_parameters_1 = __importDefault(__nccwpck_require__(80787));
|
||||||
const cli_1 = __nccwpck_require__(55651);
|
const cli_1 = __nccwpck_require__(55651);
|
||||||
|
const cloud_runner_options_1 = __importDefault(__nccwpck_require__(66965));
|
||||||
class RemoteClient {
|
class RemoteClient {
|
||||||
static async setupRemoteClient() {
|
static async setupRemoteClient() {
|
||||||
cloud_runner_logger_1.default.log(`bootstrap game ci cloud runner...`);
|
cloud_runner_logger_1.default.log(`bootstrap game ci cloud runner...`);
|
||||||
|
|
@ -4316,11 +4317,21 @@ class RemoteClient {
|
||||||
lines[0] = lingeringLine + lines[0];
|
lines[0] = lingeringLine + lines[0];
|
||||||
lingeringLine = lines.pop() || '';
|
lingeringLine = lines.pop() || '';
|
||||||
for (const element of lines) {
|
for (const element of lines) {
|
||||||
node_fs_1.default.appendFileSync(logFile, element);
|
if (cloud_runner_options_1.default.providerStrategy !== 'k8s') {
|
||||||
|
cloud_runner_logger_1.default.log(element);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
node_fs_1.default.appendFileSync(logFile, element);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
process.stdin.on('end', () => {
|
process.stdin.on('end', () => {
|
||||||
node_fs_1.default.appendFileSync(logFile, lingeringLine);
|
if (cloud_runner_options_1.default.providerStrategy !== 'k8s') {
|
||||||
|
cloud_runner_logger_1.default.log(lingeringLine);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
node_fs_1.default.appendFileSync(logFile, lingeringLine);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static async remoteClientPostBuild() {
|
static async remoteClientPostBuild() {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -13,6 +13,7 @@ import YAML from 'yaml';
|
||||||
import GitHub from '../../github';
|
import GitHub from '../../github';
|
||||||
import BuildParameters from '../../build-parameters';
|
import BuildParameters from '../../build-parameters';
|
||||||
import { Cli } from '../../cli/cli';
|
import { Cli } from '../../cli/cli';
|
||||||
|
import CloudRunnerOptions from '../options/cloud-runner-options';
|
||||||
|
|
||||||
export class RemoteClient {
|
export class RemoteClient {
|
||||||
@CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)
|
@CliFunction(`remote-cli-pre-build`, `sets up a repository, usually before a game-ci build`)
|
||||||
|
|
@ -40,12 +41,20 @@ export class RemoteClient {
|
||||||
lingeringLine = lines.pop() || '';
|
lingeringLine = lines.pop() || '';
|
||||||
|
|
||||||
for (const element of lines) {
|
for (const element of lines) {
|
||||||
fs.appendFileSync(logFile, element);
|
if (CloudRunnerOptions.providerStrategy !== 'k8s') {
|
||||||
|
CloudRunnerLogger.log(element);
|
||||||
|
} else {
|
||||||
|
fs.appendFileSync(logFile, element);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
process.stdin.on('end', () => {
|
process.stdin.on('end', () => {
|
||||||
fs.appendFileSync(logFile, lingeringLine);
|
if (CloudRunnerOptions.providerStrategy !== 'k8s') {
|
||||||
|
CloudRunnerLogger.log(lingeringLine);
|
||||||
|
} else {
|
||||||
|
fs.appendFileSync(logFile, lingeringLine);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue