Updates for kibana-extra folder (#15471) (#15985)

* Update docs to handle kibana-extra

* Add info about plugin directory structure to docs
This commit is contained in:
Kim Joar Bekkelund 2018-01-11 21:18:30 +01:00 committed by GitHub
parent decde4d5d0
commit 49d2ffd038
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 7 deletions

View file

@ -13,20 +13,18 @@ To get started copy and paste this example to `test/functional/config.js`:
["source","js"]
-----------
import { resolve } from 'path';
import { resolveKibanaPath } from '@elastic/plugin-helpers';
import { MyServiceProvider } from './services/my_service';
import { MyAppPageProvider } from './services/my_app_page;
// allow overriding the default kibana directory
// using the KIBANA_DIR environment variable
const KIBANA_CONFIG_PATH = resolve(process.env.KIBANA_DIR || '../kibana', 'test/functional/config.js');
// the default export of config files must be a config provider
// that returns an object with the projects config values
export default async function ({ readConfigFile }) {
// read the Kibana config file so that we can utilize some of
// its services and PageObjects
const kibanaConfig = await readConfigFile(KIBANA_CONFIG_PATH);
const kibanaConfig = await readConfigFile(resolveKibanaPath('test/functional/config.js'));
return {
// list paths to the files that contain your plugins tests
@ -81,7 +79,7 @@ From the root of your repo you should now be able to run the `FunctionalTestRunn
["source","shell"]
-----------
node ../kibana/scripts/functional_test_runner
node ../../kibana/scripts/functional_test_runner
-----------
[float]

View file

@ -20,7 +20,20 @@ Many Kibana developers hang out on `irc.freenode.net` in the `#kibana` channel.
[float]
==== Plugin Generator
Check out the https://github.com/elastic/generator-kibana-plugin[plugin generator] to kick-start your plugin.
Check out the https://github.com/elastic/template-kibana-plugin/[plugin generator] to kick-start your plugin.
[float]
==== Directory structure for plugins
The Kibana directory must be named `kibana`, and your plugin directory must be located within the sibling `kibana-extra` folder, for example:
["source","shell"]
-----------
.
├── kibana
├── kibana-extra/foo-plugin
└── kibana-extra/bar-plugin
-----------
[float]
==== References in the code