fix: add plugin deploy script and fix Dockerfile plugin directory

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>
This commit is contained in:
Gandalf the Greybeard
2026-03-15 20:39:35 +00:00
parent b3c4741eaf
commit 7e6661073d
2 changed files with 72 additions and 2 deletions
+2 -2
View File
@@ -6,5 +6,5 @@ COPY src/ src/
RUN npx @kinvolk/headlamp-plugin build
FROM alpine:3.20
COPY --from=build /app/dist/ /plugins/headlamp-polaris-plugin/
COPY --from=build /app/package.json /plugins/headlamp-polaris-plugin/
COPY --from=build /app/dist/ /plugins/polaris/
COPY --from=build /app/package.json /plugins/polaris/