prometheus/scripts
Julien 9126bbbed0 makefile: Add support for skipping UI build when prebuilt assets are provided
This commit introduces the ability to skip the UI build in the Makefile by
providing prebuilt UI assets, addressing the needs of users who may not have npm
installed or who do not want to go through the front-end build process.

To achieve this, we added the `PREBUILT_ASSETS_STATIC_DIR` environment variable.
If this variable is set, the Makefile will skip the UI build and related tasks,
such as bundling npm licenses. Instead, it will use the prebuilt assets from
the specified directory.

We already publish prebuilt UI assets as part of our release artifacts
(e.g., `prometheus-web-ui-3.0.0-beta.0.tar.gz`). Users can download this tarball,
extract it, and point the `PREBUILT_ASSETS_STATIC_DIR` to the extracted folder.
This reduces build complexity, especially for users who don't have a development
environment for front-end builds.

For example, you can use the command:
`make PREBUILT_ASSETS_STATIC_DIR=static build`
where `static` refers to the directory containing the prebuilt UI files.
This change simplifies the build process while still allowing users to use a
prebuilt UI if desired.

This solution is particularly useful for users who don't need to modify the UI
and prefer to use the prebuilt version that we provide with each release.

Signed-off-by: Julien <roidelapluie@o11y.eu>
2024-09-12 12:20:24 +02:00
..
check-go-mod-version.sh Add test of Go module versions 2023-12-07 14:44:49 +01:00
compress_assets.sh makefile: Add support for skipping UI build when prebuilt assets are provided 2024-09-12 12:20:24 +02:00
genproto.sh [PRW 2.0] Merging remote-write-2.0 feature branch to main (PRW 2.0 support + metadata in WAL) (#14395) 2024-07-04 14:29:20 -07:00
get_module_version.sh add scripts/get_module_version.sh 2024-08-16 14:23:27 +02:00
golangci-lint.yml chore: update min go version to 1.22 and update to the 1.23 toolchain 2024-09-05 12:48:13 +02:00
npm-deps.sh Update npm deps for v2.39 and fix the script called to do it (#11332) 2022-09-21 23:36:28 +02:00
package_assets.sh Publish UI release artefact in our github releases (#10577) 2022-04-12 19:23:02 +02:00
sync_repo_files.sh address review comments 2024-08-12 23:36:48 +05:30
tools.go remove obsolete build tag 2024-01-17 22:26:32 +08:00
ui_release.sh Build both old & new UI into Prometheus, allow choosing via feature flag 2024-04-18 15:08:40 +02:00