The deploy-plugin-to-headlamp.sh script requires kubectl to copy built
plugin files into the Headlamp pod. Install kubectl via azure/setup-kubectl
and configure kubeconfig from either a KUBECONFIG secret (base64-encoded)
or the in-cluster service account token.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Add build and deploy-plugin-to-headlamp.sh steps before Playwright
tests so E2E always tests the current commit's plugin code instead of
whatever was previously deployed to the Headlamp instance.
Co-Authored-By: Paperclip <noreply@paperclip.ing>
Root cause of E2E failures: the E2E tests run against a live Headlamp
instance but never deploy the current PR's plugin code. The deployed
plugin still uses the old registerPluginSettings name, so the settings
component never renders.
- Fix Dockerfile output directory from headlamp-polaris-plugin to
polaris, matching the deployed plugin identity
- Add scripts/deploy-plugin-to-headlamp.sh to build and deploy the
plugin to Headlamp via kubectl before E2E tests
The e2e.yaml workflow needs a matching update to call this script
before running Playwright (requires workflows permission).
Co-Authored-By: Paperclip <noreply@paperclip.ing>
The settings component never rendered in E2E because registerPluginSettings
used 'headlamp-polaris' (and before that 'headlamp-polaris-plugin'), but
the deployed plugin directory is static-plugins/polaris — Headlamp identifies
it as 'polaris'. Changed to 'polaris' so the settings page can match the
registration to the correct plugin.
The badge click navigated to /polaris instead of /c/main/polaris because
Router.createRouteURL did not reliably resolve the cluster prefix from the
plugin context. Replaced with direct URL construction using K8s.useCluster().
Co-Authored-By: Paperclip <noreply@paperclip.ing>