Store compiled web ui in CI (#10546)
Some downstream distros fail to compile Prometheus UI (Debian, NixOS). This is an attempt to store compiled UI in circleci for them to consume it. Currently we do not expose this outside of circleci. Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu> Co-authored-by: Julien Pivotto <roidelapluie@o11y.eu>
This commit is contained in:
parent
1c1b174a8e
commit
a236166c71
|
@ -62,6 +62,9 @@ jobs:
|
||||||
- run: make ui-lint
|
- run: make ui-lint
|
||||||
- run: make ui-build-module
|
- run: make ui-build-module
|
||||||
- run: make ui-test
|
- run: make ui-test
|
||||||
|
- run: make assets-tarball -o assets
|
||||||
|
- store_artifacts:
|
||||||
|
path: web/ui/static.tar.gz
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: v3-npm-deps-{{ checksum "web/ui/package-lock.json" }}
|
key: v3-npm-deps-{{ checksum "web/ui/package-lock.json" }}
|
||||||
paths:
|
paths:
|
||||||
|
|
7
Makefile
7
Makefile
|
@ -63,10 +63,15 @@ ui-lint:
|
||||||
assets: ui-install ui-build
|
assets: ui-install ui-build
|
||||||
|
|
||||||
.PHONY: assets-compress
|
.PHONY: assets-compress
|
||||||
assets-compress:
|
assets-compress: assets
|
||||||
@echo '>> compressing assets'
|
@echo '>> compressing assets'
|
||||||
scripts/compress_assets.sh
|
scripts/compress_assets.sh
|
||||||
|
|
||||||
|
.PHONY: assets-tarball
|
||||||
|
assets-tarball: assets-compress
|
||||||
|
@echo '>> packaging assets'
|
||||||
|
scripts/package_assets.sh
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
# If we only want to only test go code we have to change the test target
|
# If we only want to only test go code we have to change the test target
|
||||||
# which is called by all.
|
# which is called by all.
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# compress static assets
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd web/ui
|
||||||
|
find static -type f -name '*.gz' -print0 | xargs -0 tar cf static.tar.gz
|
Loading…
Reference in New Issue