Skip to content

Commit

Permalink
chore: use embedded dashboard in Linux binary release (#15836) (#15859)
Browse files Browse the repository at this point in the history
Co-authored-by: Bugen Zhao <[email protected]>
  • Loading branch information
github-actions[bot] and BugenZhao authored Mar 22, 2024
1 parent 1095a4f commit 30560ae
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 33 deletions.
10 changes: 7 additions & 3 deletions ci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ unzip -o protoc-3.15.8-linux-${PROTOC_ARCH}.zip -d protoc
mv ./protoc/bin/protoc /usr/local/bin/
mv ./protoc/include/* /usr/local/include/

echo "--- Install nodejs"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
cd dashboard && nvm install && nvm use && cd ..

echo "--- Check risingwave release version"
if [[ -n "${BUILDKITE_TAG}" ]]; then
CARGO_PKG_VERSION="$(toml get --toml-path Cargo.toml workspace.package.version)"
Expand All @@ -59,9 +65,7 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then
fi

echo "--- Build risingwave release binary"
# TODO(bugen): It's really hard to get the dashboard built on such old distro.
# The assets will be proxied to GitHub during runtime.
# export ENABLE_BUILD_DASHBOARD=1
export ENABLE_BUILD_DASHBOARD=1
cargo build -p risingwave_cmd_all --features "rw-static-link" --profile release
cargo build -p risingwave_cmd --bin risectl --features "rw-static-link" --profile release
cd target/release && chmod +x risingwave risectl
Expand Down
2 changes: 1 addition & 1 deletion dashboard/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.11.0
v20.11.1
1 change: 1 addition & 0 deletions dashboard/.nvmrc
46 changes: 23 additions & 23 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"react-syntax-highlighter": "^15.5.0",
"recharts": "^2.3.2",
"styled-components": "5.3.0",
"ts-proto": "^1.156.2"
"ts-proto": "^1.169.1"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ FROM base AS rust-base

RUN apt-get update && apt-get -y install make cmake protobuf-compiler curl bash lld unzip

# Install Node.js as requirement for building the dashboard.
# Install Node.js as dependency for building the dashboard.
# Bump version together with `dashboard/.node-version`.
ENV NVM_DIR /root/.nvm
ENV NVM_VERSION 0.39.7
ENV NODE_VERSION 20.11.1
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash \
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
Expand Down
3 changes: 1 addition & 2 deletions src/meta/dashboard/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use std::path::{Path, PathBuf};

use cargo_emit::{rerun_if_changed, rustc_cfg};
use npm_rs::{NodeEnv, NpmEnv};
use npm_rs::NpmEnv;

fn env_var_is_true(key: &str) -> bool {
cargo_emit::rerun_if_env_changed!(key);
Expand All @@ -42,7 +42,6 @@ fn build() -> anyhow::Result<()> {
rerun_if_changed!(format!("{DASHBOARD_DIR}/components"));

let exit_status = NpmEnv::default()
.with_node_env(&NodeEnv::Production)
.set_path(DASHBOARD_DIR)
.init_env()
.install(None)
Expand Down

0 comments on commit 30560ae

Please sign in to comment.