For changes that may have major implications on existing Kibana usages of EUI, a built version of EUI should be tested against Kibana (ideally before being merged/released into EUI) to ensure that the upgrade process is as painless as possible.
Note that yarn link
currently does not work with Kibana. You'll need to manually pack and insert it into Kibana to test locally.
yarn build-pack
This will create a .tgz
file with the changes in your EUI directory. At this point you can move it anywhere.
Point the package.json
file in Kibana to that file: "@elastic/eui": "/path/to/elastic-eui-xx.x.x.tgz"
. Then run the following commands at Kibana's root folder:
yarn kbn bootstrap --no-validate && yarn start
- The
--no-validate
flag is required when bootstrapping with a.tgz
.- Change the name of the
.tgz
after subsequentyarn build-pack
steps (e.g.,elastic-eui-xx.x.x-1.tgz
,elastic-eui-xx.x.x-2.tgz
). This is required foryarn
to recognize new changes to the package.
- Change the name of the
- Running Kibana with
yarn start
ensures it starts in dev mode and doesn't use a previously cached version of EUI.
Elastic engineers have the option to deploy a local EUI package in Kibana. To do so, do the following:
- Follow the steps above to create a local package of EUI using
yarn build-pack
- Copy the generated
.tgz
package file to the Kibana root - Point the
package.json
file in Kibana to that local file:"@elastic/eui": "./elastic-eui-xx.x.x.tgz"
. - Run
yarn kbn bootstrap
- Commit the changed files (
package.json
.yarn.lock
and EUI.tgz
package) and push your branch - Create a Kibana (draft) pull request
- Kibana CI will run tests on this instance with your custom EUI package
There are two ways you can deploy your local EUI package in Kibana.
- add the labels
ci:cloud-deploy
andci:cloud-persist-deployment
on your PR and ensure the CI pipelines run
- after the pipelines finish the "Build" information will have a link to the cloud deployment and access information (vault access is required)
- use Kibana-a-la-carte to deploy your PR