kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From granthe...@apache.org
Subject [1/3] kudu git commit: Support running full Gradle builds in build-and-test.sh
Date Mon, 23 Apr 2018 21:54:32 GMT
Repository: kudu
Updated Branches:
  refs/heads/master 28d847513 -> b69f288e9


Support running full Gradle builds in build-and-test.sh

As a first step to using the Gradle build as the primary build
and phasing out Maven, this patch makes it possible to
choose between Maven and Gradle in build-and-test.sh.

A follow on patch will make Gradle the default.

Change-Id: I27a1bd330227d735f2139ceb420947528363f81c
Reviewed-on: http://gerrit.cloudera.org:8080/10152
Tested-by: Kudu Jenkins
Reviewed-by: Adar Dembo <adar@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/90c1e1c2
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/90c1e1c2
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/90c1e1c2

Branch: refs/heads/master
Commit: 90c1e1c26bbad4c402b575562504b41aa3bd4b7f
Parents: 28d8475
Author: Grant Henke <granthenke@apache.org>
Authored: Sun Apr 22 22:56:46 2018 -0500
Committer: Grant Henke <granthenke@apache.org>
Committed: Mon Apr 23 21:11:42 2018 +0000

----------------------------------------------------------------------
 build-support/jenkins/build-and-test.sh | 37 +++++++++++++++-------------
 1 file changed, 20 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/90c1e1c2/build-support/jenkins/build-and-test.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 35fddb1..cf60d40 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -56,9 +56,11 @@
 #   BUILD_JAVA        Default: 1
 #     Build and test java code if this is set to 1.
 #
-#   BUILD_GRADLE      Default: 1
-#     When building java code, also build the gradle build if this is set
-#     to 1.
+#   BUILD_MAVEN       Default: 1
+#     When building java code, build with Maven if this is set to 1.
+#
+#   BUILD_GRADLE      Default: 0
+#     When building java code, build with Gradle if this is set to 1.
 #
 #   BUILD_PYTHON       Default: 1
 #     Build and test the Python wrapper of the client API.
@@ -110,7 +112,8 @@ export KUDU_ALLOW_SLOW_TESTS=${KUDU_ALLOW_SLOW_TESTS:-$DEFAULT_ALLOW_SLOW_TESTS}
 export KUDU_COMPRESS_TEST_OUTPUT=${KUDU_COMPRESS_TEST_OUTPUT:-1}
 export TEST_TMPDIR=${TEST_TMPDIR:-/tmp/kudutest-$UID}
 BUILD_JAVA=${BUILD_JAVA:-1}
-BUILD_GRADLE=${BUILD_GRADLE:-1}
+BUILD_MAVEN=${BUILD_MAVEN:-1}
+BUILD_GRADLE=${BUILD_GRADLE:-0}
 BUILD_PYTHON=${BUILD_PYTHON:-1}
 BUILD_PYTHON3=${BUILD_PYTHON3:-1}
 
@@ -201,7 +204,6 @@ elif [ "$BUILD_TYPE" = "COVERAGE" ]; then
 
   # We currently dont capture coverage for Java or Python.
   BUILD_JAVA=0
-  BUILD_GRADLE=0
   BUILD_PYTHON=0
   BUILD_PYTHON3=0
 elif [ "$BUILD_TYPE" = "LINT" ]; then
@@ -320,7 +322,6 @@ if [ "$RUN_FLAKY_ONLY" == "1" ] ; then
   BUILD_PYTHON=0
   BUILD_PYTHON3=0
   BUILD_JAVA=0
-  BUILD_GRADLE=0
 fi
 
 EXIT_STATUS=0
@@ -375,22 +376,24 @@ if [ "$BUILD_JAVA" == "1" ]; then
   set -x
 
   # Run the full Maven build.
-  MVN_FLAGS="$MVN_FLAGS -B"
-  MVN_FLAGS="$MVN_FLAGS -Dsurefire.rerunFailingTestsCount=3"
-  MVN_FLAGS="$MVN_FLAGS -Dfailsafe.rerunFailingTestsCount=3"
-  MVN_FLAGS="$MVN_FLAGS -Dmaven.javadoc.skip"
-  if ! mvn $MVN_FLAGS clean verify ; then
-    EXIT_STATUS=1
-    FAILURES="$FAILURES"$'Java build/test failed\n'
+  if [ "$BUILD_MAVEN" == "1" ]; then
+      MVN_FLAGS="$MVN_FLAGS -B"
+      MVN_FLAGS="$MVN_FLAGS -Dsurefire.rerunFailingTestsCount=3"
+      MVN_FLAGS="$MVN_FLAGS -Dfailsafe.rerunFailingTestsCount=3"
+      MVN_FLAGS="$MVN_FLAGS -Dmaven.javadoc.skip"
+      if ! mvn $MVN_FLAGS clean verify ; then
+        EXIT_STATUS=1
+        FAILURES="$FAILURES"$'Java Maven build/test failed\n'
+      fi
   fi
 
-  # Rerun the build using the Gradle build.
-  # Note: We just ensure we can assemble and don't rerun the tests.
+  # Run the full Gradle build.
   if [ "$BUILD_GRADLE" == "1" ]; then
      GRADLE_FLAGS="$GRADLE_FLAGS --console=plain --no-daemon"
-     if ! ./gradlew $GRADLE_FLAGS clean assemble; then
+     # TODO: Run `gradle check` in BUILD_TYPE DEBUG when static code analysis is fixed
+     if ! ./gradlew $GRADLE_FLAGS clean test integrationTest ; then
        EXIT_STATUS=1
-       FAILURES="$FAILURES"$'Java Gradle build failed\n'
+       FAILURES="$FAILURES"$'Java Gradle build/test failed\n'
      fi
   fi
 


Mime
View raw message