From 2debef5e814d7ba402256c056a0e0602fea95342 Mon Sep 17 00:00:00 2001 From: John Blum Date: Fri, 9 Jun 2023 16:36:23 -0700 Subject: [PATCH] Switch Jenkins CI pipeline build to 'gradlew clean build'. --- Jenkinsfile | 13 ++++++------- ci/build.sh | 6 ++++++ 2 files changed, 12 insertions(+), 7 deletions(-) create mode 100755 ci/build.sh diff --git a/Jenkinsfile b/Jenkinsfile index 00ee062..0ff6fba 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -33,20 +33,19 @@ pipeline { // Cleanup any prior build system resources try { - sh "echo 'Clean up GemFire/Geode files & build artifacts...'" - sh "ci/cleanupGemFiles.sh" sh "ci/cleanupArtifacts.sh" + sh "ci/cleanupGemFiles.sh" } catch (ignore) { } // Run the SBDG project Gradle build using JDK 8 inside Docker try { sh "echo 'Building SSDG...'" - sh "ci/check.sh" + sh "ci/build.sh" } - catch (e) { + catch (cause) { currentBuild.result = "FAILED: build" - throw e + throw cause } finally { junit '**/build/test-results/*/*.xml' @@ -64,9 +63,9 @@ pipeline { try { sh "ci/deployDocs.sh" } - catch (e) { + catch (cause) { currentBuild.result = "FAILED: deploy docs" - throw e + throw cause } } } diff --git a/ci/build.sh b/ci/build.sh new file mode 100755 index 0000000..e5e8c9e --- /dev/null +++ b/ci/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash -x + +set -eou pipefail + +GRADLE_OPTS="-Duser.name=jenkins -Djava.io.tmpdir=/tmp -Dgradle.user.home=/tmp/geode/session/build-gradle-cache" \ + ./gradlew --no-daemon --refresh-dependencies --stacktrace clean build