You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by wf...@apache.org on 2014/05/23 20:52:08 UTC

git commit: Opt-in for code quality checks to speed up development iteration.

Repository: incubator-aurora
Updated Branches:
  refs/heads/master b055ec9ff -> 398583a02


Opt-in for code quality checks to speed up development iteration.

Reviewed at https://reviews.apache.org/r/21455/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/398583a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/398583a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/398583a0

Branch: refs/heads/master
Commit: 398583a0271e09373ca1ec22f6a178a0bba01ca3
Parents: b055ec9
Author: Bill Farner <wf...@apache.org>
Authored: Fri May 23 11:47:44 2014 -0700
Committer: Bill Farner <wf...@apache.org>
Committed: Fri May 23 11:47:44 2014 -0700

----------------------------------------------------------------------
 build-support/jenkins/build.sh      |  2 +-
 build.gradle                        | 17 +++++++++++++++++
 docs/developing-aurora-scheduler.md |  8 ++++++++
 3 files changed, 26 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/398583a0/build-support/jenkins/build.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build.sh b/build-support/jenkins/build.sh
index f6f4940..43e0057 100755
--- a/build-support/jenkins/build.sh
+++ b/build-support/jenkins/build.sh
@@ -20,7 +20,7 @@ set -ex
 date
 
 # Run all Java tests
-./gradlew clean build
+./gradlew -Pq clean build
 
 # Run all Python tests
 ./pants src/test/python:all -vxs

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/398583a0/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index d220385..4d92cb5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -236,6 +236,23 @@ dependencies {
   }
 }
 
+// For normal developer builds, avoid running the often-time-consuming code quality checks.
+// Jenkins will always run these, and developers are encouraged to run these before posting diffs
+// and pushing to master.
+def runCodeQuality = project.hasProperty('q')
+def codeQualityTasks = [
+    Checkstyle,
+    FindBugs,
+    nl.javadude.gradle.plugins.license.License,
+    JacocoReport,
+    Pmd
+]
+codeQualityTasks.each {
+  tasks.withType(it) {
+    enabled = runCodeQuality
+  }
+}
+
 checkstyle {
   sourceSets = [ sourceSets.main , sourceSets.test]
 }

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/398583a0/docs/developing-aurora-scheduler.md
----------------------------------------------------------------------
diff --git a/docs/developing-aurora-scheduler.md b/docs/developing-aurora-scheduler.md
index 95bf472..7f6cc2e 100644
--- a/docs/developing-aurora-scheduler.md
+++ b/docs/developing-aurora-scheduler.md
@@ -20,6 +20,14 @@ tests use
 
     ./gradlew clean build
 
+Running the build with code quality checks
+------------------------------------------
+To speed up development iteration, the plain gradle commands will not run static analysis tools.
+However, you should run these before posting a review diff, and **always** run this before pushing a
+commit to origin/master.
+
+    ./gradlew build -Pq
+
 Creating a bundle for deployment
 --------------------------------
 Gradle can create a zip file containing Aurora, all of its dependencies, and a launch script with