👷 Add JDK to use for build in pipeline
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 30 Sep 2024 12:43:17 +0000 (14:43 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Mon, 30 Sep 2024 12:43:17 +0000 (14:43 +0200)
Jenkinsfile

index 6775f35..b8d026d 100644 (file)
@@ -7,11 +7,17 @@ pipeline {
 
     stages {
         stage('Build') {
+            tools {
+                jdk 'OpenJDK 8'
+            }
             steps {
                 sh './gradlew clean classes testClasses'
             }
         }
         stage('Test') {
+            tools {
+                jdk 'OpenJDK 8'
+            }
             steps {
                 sh './gradlew test'
             }
@@ -22,12 +28,18 @@ pipeline {
             }
         }
         stage('Binary') {
+            tools {
+                jdk 'OpenJDK 8'
+            }
             steps {
                 sh './gradlew fatJar'
                 archiveArtifacts artifacts: 'build/libs/sone*-jar-with-dependencies.jar', fingerprint: true
             }
         }
         stage('Reports') {
+            tools {
+                jdk 'OpenJDK 8'
+            }
             steps {
                 sh './gradlew jacocoTestReport findbugsMain countLines'
                 jacoco classPattern: 'build/classes/*/main', sourcePattern: '**/src/main/'