diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..f02a853ea60 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,104 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +version: 2.1 + +commands: + build-common: + parameters: + jdk_version: + # 8, 11, 17, ... + type: integer + default: 8 + + steps: + - checkout + + - restore_cache: + keys: + - maven-repo-v1-{{ .Branch }}-{{ checksum "pom.xml" }} + - maven-repo-v1-{{ .Branch }}- + - maven-repo-v1- + + - run: + name: Delete ~/.m2/repository/org/apache/zeppelin + command: rm -rf ~/.m2/repository/org/apache/zeppelin + + - run: + name: Install build tools + command: | + sudo apt-get update -y + DEBIAN_FRONTEND=noninteractive \ + DEBCONF_NONINTERACTIVE_SEEN=true \ + TZ=UTC \ + sudo apt-get install -y --no-install-recommends openjdk-<< parameters.jdk_version >>-jdk maven wget + + - run: + name: Print JDK and Maven versions + command: | + java -version + mvn -version + + - run: + name: install application with some interpreter + command: | + mvn install -Pbuild-distr -DskipRat -DskipTests -pl zeppelin-server,zeppelin-web,spark-submit,spark/spark-dependencies,markdown,angular,shell -am -Phelium-dev -Pexamples -Phadoop3 --batch-mode --no-transfer-progress --fail-never + + - run: + name: install and test plugins + command: mvn package -DskipRat -pl zeppelin-plugins,-org.apache.zeppelin:notebookrepo-mongo -amd -B + + - run: + name: run tests with hadoop3 + command: | + mvn verify -Pusing-packaged-distr -DskipRat -pl zeppelin-server,zeppelin-web,spark-submit,spark/spark-dependencies,markdown,angular,shell -am -Phelium-dev -Pexamples -Phadoop3 -Dtests.to.exclude=**/org/apache/zeppelin/spark/* -DfailIfNoTests=false + + - save_cache: + paths: + - ~/.m2 + key: maven-repo-v1-{{ .Branch }}-{{ checksum "pom.xml" }} + + - run: + name: Maven verify + command: mvn clean verify -Pspark-3.0 -Pspark-scala-2.12 --also-make-dependents --batch-mode --no-transfer-progress + +jobs: + build-arm64: + machine: + image: ubuntu-2004:202101-01 + resource_class: arm.medium + + environment: + MAVEN_OPTS: "-Xms1024M -Xmx2048M -XX:MaxMetaspaceSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.count=3" + ZEPPELIN_HELIUM_REGISTRY: helium + SPARK_PRINT_LAUNCH_COMMAND: "true" + SPARK_LOCAL_IP: "127.0.0.1" + ZEPPELIN_LOCAL_IP: "127.0.0.1" + JAVA_HOME: "/usr/lib/jvm/java-8-openjdk-arm64/" + + working_directory: ~/zeppelin + + steps: + - build-common + +workflows: + version: 2 + run-build-and-tests: + jobs: + - build-arm64 diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 00000000000..12f4b766180 --- /dev/null +++ b/.cirrus.yml @@ -0,0 +1,23 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +test_task: + arm_container: + image: 3.8.2-openjdk-8-slim + test_script: mvn install -Pbuild-distr -DskipRat -DskipTests -pl zeppelin-server,zeppelin-web,spark-submit,spark/spark-dependencies,markdown,angular,shell -am -Phelium-dev -Pexamples -Phadoop3 --batch-mode --no-transfer-progress --fail-never diff --git a/Dockerfile b/Dockerfile index 28606ea4cfb..3ba225eeded 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ WORKDIR /workspace/zeppelin RUN echo "unsafe-perm=true" > ~/.npmrc && \ echo '{ "allow_root": true }' > ~/.bowerrc && \ mvn -B package -DskipTests -Pbuild-distr -Pspark-3.0 -Pinclude-hadoop -Phadoop3 -Pspark-scala-2.12 -Pweb-angular && \ - # Example with doesn't compile all interpreters + # Example which doesn't compile all interpreters # mvn -B package -DskipTests -Pbuild-distr -Pspark-3.0 -Pinclude-hadoop -Phadoop3 -Pspark-scala-2.12 -Pweb-angular -pl '!groovy,!submarine,!livy,!hbase,!pig,!file,!flink,!ignite,!kylin,!lens' && \ mv /workspace/zeppelin/zeppelin-distribution/target/zeppelin-*/zeppelin-* /opt/zeppelin/ && \ # Removing stuff saves time, because docker creates a temporary layer