Skip to content

Commit

Permalink
chore: use embedded dashboard in Linux binary release
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Mar 21, 2024
1 parent 6d01b16 commit 27bd8b9
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 31 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- 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

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

0 comments on commit 27bd8b9

Please sign in to comment.