-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Option to run kibana from build for CI (#19125) * Support --dev option for servers only * try skipping dashboard time zones test
- Loading branch information
Showing
11 changed files
with
128 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 28 additions & 6 deletions
34
packages/kbn-test/src/functional_tests/lib/run_kibana_server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
import { resolve } from 'path'; | ||
import { KIBANA_ROOT, KIBANA_EXEC, KIBANA_EXEC_PATH } from './paths'; | ||
|
||
export async function runKibanaServer({ procs, config }) { | ||
const cliArgs = config.get('kibanaServerArgs') || []; | ||
export async function runKibanaServer({ procs, config, options }) { | ||
const { installDir } = options; | ||
|
||
// start the kibana server and wait for it to log "Server running" before resolving | ||
await procs.run('kibana', { | ||
cmd: KIBANA_EXEC, | ||
args: [KIBANA_EXEC_PATH, ...cliArgs], | ||
cmd: getKibanaCmd(installDir), | ||
args: getCliArgs(config, options), | ||
env: { | ||
FORCE_COLOR: 1, | ||
...process.env, | ||
}, | ||
cwd: KIBANA_ROOT, | ||
cwd: installDir || KIBANA_ROOT, | ||
wait: /Server running/, | ||
}); | ||
} | ||
|
||
function getKibanaCmd(installDir) { | ||
if (installDir) { | ||
return process.platform.startsWith('win') | ||
? resolve(installDir, 'bin/kibana.bat') | ||
: resolve(installDir, 'bin/kibana'); | ||
} | ||
|
||
return KIBANA_EXEC; | ||
} | ||
|
||
function getCliArgs(config, { devMode, installDir }) { | ||
const buildArgs = config.get('kbnTestServer.buildArgs') || []; | ||
const sourceArgs = config.get('kbnTestServer.sourceArgs') || []; | ||
const serverArgs = config.get('kbnTestServer.serverArgs') || []; | ||
|
||
if (devMode) serverArgs.push('--dev'); | ||
|
||
return installDir | ||
? [...serverArgs, ...buildArgs] | ||
: [KIBANA_EXEC_PATH, ...serverArgs, ...sourceArgs]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters