Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CDN task assets discovery (#177985)
## Summary Plugin static assets were not being included in the CDN bundle due to the task looking in `<plugin_root>/assets` only. This fix adds `<plugin_root>/public/assets`. ## Output structure <details> <summary>tree</summary> ``` ❯ tree -dL 3 . . └── <hash> ├── bundles │ ├── core │ ├── kbn-monaco │ ├── kbn-ui-shared-deps-npm │ ├── kbn-ui-shared-deps-src │ └── plugin ├── plugins │ ├── apm │ ├── cloudDefend │ ├── cloudSecurityPosture │ ├── customIntegrations │ ├── dashboard │ ├── dataViewFieldEditor │ ├── discover │ ├── enterpriseSearch │ ├── fleet │ ├── globalSearchBar │ ├── home │ ├── indexManagement │ ├── kibanaOverview │ ├── kibanaReact │ ├── lens │ ├── maps │ ├── observability │ ├── observabilityAIAssistant │ ├── observabilityOnboarding │ ├── osquery │ ├── remoteClusters │ ├── serverlessSearch │ └── timelines └── ui ├── favicons └── fonts 35 directories ``` </details> ## Test 1. Build distributable using `node scripts/build.js` to get CDN assets 2. Untar `./target/kibana-8.14.0-SNAPSHOT-cdn-assets.tar.gz` 3. Add an entry to `/etc/hosts` to resolve to `127.0.0.1` 4. `cd` into the untarred folder and serve the assets, I used `npx http-server -p 1772 --cors --gzip --brotli` 5. Add `server.cdn.url: "http://my.cdn.test:1772"` to your Kibana config 6. Start Kibana and ES, see assets are loading for the home app from our "CDN" <img width="1813" alt="Screenshot 2024-03-05 at 11 14 45" src="https://github.com/elastic/kibana/assets/8155004/e322c02b-2d42-4adc-9767-3a5b276b7be4">
- Loading branch information