Skip to content

Commit

Permalink
[WIP] Jenkins build touchups
Browse files Browse the repository at this point in the history
* install latest version (8.4 as of this commit) of gradle wrapper before running tests in CI (with comment about how/when to pin to a specific version if need be)
* print some debug info about java and gradle in CI test stage
* disable gradle build/config caching
* [debugging, WIP] try user installed openjdk21 to fix the build
  • Loading branch information
jmartin-sul committed Nov 29, 2023
1 parent 93a37b0 commit f38771d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,19 @@ pipeline {

stage('Test') {
steps {
sh 'JAVA_OPTS= ./gradlew clean check'
withEnv(["JAVA_HOME=/home/$USER/openjdk21/jdk-21.0.1", "PATH=$JAVA_HOME/bin:$PATH"]) {
sh 'printenv | sort'
sh 'java -version' // print the java version being used, to aid in debugging build issues

// if the build breaks, and it's necessary to temporarily pin to a known working gradle
// version, can do e.g. --gradle-version=8.4
sh 'JAVA_OPTS= ./gradlew wrapper --gradle-version=latest --distribution-type=bin'
sh './gradlew --version' // print some basic gradle info, to aid in debugging build issues

// make extra sure that no stale build artifacts are confounding things -- can revisit if builds are
// unpleasantly slow
sh 'JAVA_OPTS= ./gradlew --no-build-cache --no-configuration-cache clean check'
}
}
}

Expand Down

0 comments on commit f38771d

Please sign in to comment.