From 59b33d5ff8df8981d755ea52da0e186afb5e9344 Mon Sep 17 00:00:00 2001 From: Rsl1122 Date: Tue, 6 Aug 2019 12:16:13 +0300 Subject: [PATCH] Parallel gradle execution where possible --- Jenkinsfile | 17 +++++++++++++---- scripts/pre-commit | 3 ++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 970f0b3d3..32784ea20 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,14 +2,23 @@ pipeline { agent any stages { - stage('Test') { + stage('Build') { + steps { + dir("Plan") { + script { + sh './gradlew shadowJar --parallel' + } + } + } + } + stage('Tests') { steps { dir("Plan") { script { try { - sh './gradlew clean test --no-daemon' //run a gradle task + sh './gradlew clean test --no-daemon' } finally { - junit '**/build/test-results/test/*.xml' //make the junit test results available in any case (success & failure) + junit '**/build/test-results/test/*.xml' } } } @@ -19,7 +28,7 @@ pipeline { steps { dir("Plan") { script { - sh './gradlew checkstyleMain checkstyleTest' + sh './gradlew checkstyleMain checkstyleTest --parallel' } } } diff --git a/scripts/pre-commit b/scripts/pre-commit index 53b7f427c..b8c185d16 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -1 +1,2 @@ -./gradlew checkstyleMain checkstyleTest +cd Plan +./gradlew checkstyleMain checkstyleTest --parallel