[cli/dev] allow running --dev without kibana.dev.yml (#36400)

* [cli/dev] allow running --dev without kibana.dev.yml

* disable kibana.dev.yml for functional test servers

* [cli/dev] automatically strip xpack config when running --oss

* revert bad merge artifact
This commit is contained in:
Spencer 2019-05-20 10:18:12 -07:00 committed by GitHub
parent c87e8811cb
commit 5bc035226f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View file

@ -109,7 +109,10 @@ export async function startServers(options) {
config,
options: {
...opts,
extraKbnOpts: [...options.extraKbnOpts, ...(options.installDir ? [] : ['--dev'])],
extraKbnOpts: [
...options.extraKbnOpts,
...(options.installDir ? [] : ['--dev', '--no-dev-config']),
],
},
});

View file

@ -184,19 +184,20 @@ export default function (program) {
.option('--open', 'Open a browser window to the base url after the server is started')
.option('--ssl', 'Run the dev server using HTTPS')
.option('--no-base-path', 'Don\'t put a proxy in front of the dev server, which adds a random basePath')
.option('--no-watch', 'Prevents automatic restarts of the server in --dev mode');
.option('--no-watch', 'Prevents automatic restarts of the server in --dev mode')
.option('--no-dev-config', 'Prevents loading the kibana.dev.yml file in --dev mode');
}
command
.action(async function (opts) {
if (opts.dev) {
if (opts.dev && opts.devConfig !== false) {
try {
const kbnDevConfig = fromRoot('config/kibana.dev.yml');
if (statSync(kbnDevConfig).isFile()) {
opts.config.push(kbnDevConfig);
}
} catch (err) {
// ignore, kibana.dev.yml does not exist
// ignore, kibana.dev.yml does not exist
}
}

View file

@ -189,6 +189,7 @@ module.exports = function (grunt) {
flags: [
...browserTestServerFlags,
'--dev',
'--no-dev-config',
'--no-watch',
'--no-base-path',
'--optimize.watchPort=5611',