Generate static UI files from within a container (#6972)

* Generate static UI files from within a container, for more predictability

For some reason, Angular was not generating the same hash
for the `runtime*.js` file (even with the same content),
causing the 'check-ui-static-files' job to sometimes fail.

Leveraging a container (as we are already doing for the
'generate-apiserver' and 'generate-apifront' tasks)
should allow for more predictable output.

Co-authored-by: Philippe Martin <phmartin@redhat.com>

* Generate static UI

---------

Co-authored-by: Philippe Martin <phmartin@redhat.com>
This commit is contained in:
Armel Soro
2023-07-18 08:21:50 +02:00
committed by GitHub
parent abdb1c568d
commit 9fd65cd27d
3 changed files with 6 additions and 3 deletions

View File

@@ -79,7 +79,10 @@ help: ## Show this help.
.PHONY: ui-static
ui-static: ## build static files for UI to be served by embedded API server
(cd ui && npm install && npm run build) && rm -rf pkg/apiserver-impl/ui/* && mv ui/dist/devfile-builder/* pkg/apiserver-impl/ui/
podman run --rm \
-v ${PWD}:/local \
-t docker.io/library/node:18 \
/bin/sh -c "cd /local && (cd ui && npm install && npm run build) && rm -rf pkg/apiserver-impl/ui/* && mv ui/dist/devfile-builder/* pkg/apiserver-impl/ui/"
.PHONY: bin
bin: ## build the odo binary