Skip to content

Commit

Permalink
feat: download openmldb spark distribution in java cicd (4paradigm#1111)
Browse files Browse the repository at this point in the history
Add script to download openmldb spark distribution
Download and extract spark files in cicd of java
This is useful for unit tests of TaskManager which requires TaskManager with Spark to run test cases.
  • Loading branch information
tobegit3hub authored Jan 19, 2022
1 parent 59d4a89 commit c4e9050
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ jobs:
SQL_JAVASDK_ENABLE: ON
OPENMLDB_BUILD_TARGET: 'cp_native_so openmldb'
MAVEN_OPTS: -Duser.home=/github/home
SPARK_HOME: /tmp/spark/
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -166,6 +167,7 @@ jobs:
- name: start services
run: |
sh steps/ut_zookeeper.sh start
sh steps/download_openmldb_spark.sh $SPARK_HOME
cd onebox && sh start_onebox.sh && cd - || exit
- name: run java modules smoke test
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
SQL_JAVASDK_ENABLE: ON
TESTING_ENABLE: ON
NPROC: 8
SPARK_HOME: /tmp/spark/
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -48,6 +49,7 @@ jobs:
- name: start service
run: |
sh steps/ut_zookeeper.sh start
sh steps/download_openmldb_spark.sh $SPARK_HOME
cd onebox
bash start_onebox.sh
Expand Down
14 changes: 14 additions & 0 deletions steps/download_openmldb_spark.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

set -xe

SPARK_HOME_PATH=$1

# Download OpenMLDB Spark distribution
curl -L -o spark-3.0.0-bin-openmldbspark.tgz https://github.com/4paradigm/spark/releases/download/v3.0.0-openmldb0.4.0/spark-3.0.0-bin-openmldbspark.tgz
tar xzf ./spark-3.0.0-bin-openmldbspark.tgz

# Move Spark files to $SPARK_HOME
mv ./spark-3.0.0-bin-openmldbspark/ "$SPARK_HOME_PATH"

rm ./spark-3.0.0-bin-openmldbspark.tgz

0 comments on commit c4e9050

Please sign in to comment.