mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[bazel] on CI, log buffered log lines that start with INFO: (#136981)
This commit is contained in:
parent
4b52441a53
commit
757001f3c6
1 changed files with 10 additions and 1 deletions
|
@ -58,7 +58,7 @@ function once(emitter, event) {
|
|||
* @param {import('./types').BazelRunOptions | undefined} options
|
||||
*/
|
||||
async function runBazelRunner(runner, args, options = undefined) {
|
||||
const proc = ChildProcess.spawn(runner, args, {
|
||||
const proc = ChildProcess.spawn(runner, options?.quiet ? [...args, '--color=no'] : args, {
|
||||
env: {
|
||||
...process.env,
|
||||
...options?.env,
|
||||
|
@ -101,6 +101,15 @@ async function runBazelRunner(runner, args, options = undefined) {
|
|||
}),
|
||||
]),
|
||||
]);
|
||||
|
||||
if (process.env.CI) {
|
||||
// on CI it's useful to reduce the logging output, but we still want to see basic info from Bazel so continue to log the INFO: lines from bazel
|
||||
for (const line of buffer) {
|
||||
if (line.startsWith('INFO:') && !line.startsWith('INFO: From ')) {
|
||||
console.log(options?.logPrefix ? `${options.logPrefix} ${line}` : line);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue