Skip to content

Commit

Permalink
build(release): release risingwave all-in-one (#13133)
Browse files Browse the repository at this point in the history
Co-authored-by: Jianwei Huang <[email protected]>
  • Loading branch information
chenzl25 and huangjw806 authored Oct 31, 2023
1 parent c583e2c commit 9616cbf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
13 changes: 10 additions & 3 deletions ci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@ fi

echo "--- Build connector node"
cd ${REPO_ROOT}/java && mvn -B package -Dmaven.test.skip=true -Dno-build-rust
cd ${REPO_ROOT} && mv ${REPO_ROOT}/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz risingwave-connector-"${BUILDKITE_TAG}".tar.gz

if [[ -n "${BUILDKITE_TAG}" ]]; then
echo "--- Collect all release assets"
cd ${REPO_ROOT} && mkdir release-assets && cd release-assets
cp -r ${REPO_ROOT}/target/release/* .
mv ${REPO_ROOT}/java/connector-node/assembly/target/risingwave-connector-1.0.0.tar.gz risingwave-connector-"${BUILDKITE_TAG}".tar.gz
tar -zxvf risingwave-connector-"${BUILDKITE_TAG}".tar.gz libs
ls -l

echo "--- Install gh cli"
yum install -y dnf
dnf install -y 'dnf-command(config-manager)'
Expand All @@ -90,8 +96,9 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then
tar -czvf risectl-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz risectl
gh release upload "${BUILDKITE_TAG}" risectl-"${BUILDKITE_TAG}"-x86_64-unknown-linux.tar.gz

echo "--- Release build and upload risingwave connector node jar asset"
gh release upload "${BUILDKITE_TAG}" risingwave-connector-"${BUILDKITE_TAG}".tar.gz
echo "--- Release upload risingwave-all-in-one asset"
tar -czvf risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux-all-in-one.tar.gz risingwave libs
gh release upload "${BUILDKITE_TAG}" risingwave-"${BUILDKITE_TAG}"-x86_64-unknown-linux-all-in-one.tar.gz
fi


Expand Down
9 changes: 5 additions & 4 deletions src/jni_core/src/jvm_runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ impl JavaVmWrapper {
let libs_path = if let Ok(libs_path) = std::env::var("CONNECTOR_LIBS_PATH") {
libs_path
} else {
return Err(ErrorCode::InternalError(
"environment variable CONNECTOR_LIBS_PATH is not specified".to_string(),
)
.into());
tracing::warn!("environment variable CONNECTOR_LIBS_PATH is not specified, so use default path `./libs` instead");
let path = std::env::current_exe()?.parent().unwrap().join("./libs");
path.to_str().unwrap().into()
};

tracing::info!("libs_path = {}", libs_path);

let dir = Path::new(&libs_path);

if !dir.is_dir() {
Expand Down

0 comments on commit 9616cbf

Please sign in to comment.