From b1877a9d003f26fbf1150397bed94502b5b78a0e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Wed, 2 Oct 2024 11:07:51 +0200 Subject: [PATCH] =?utf8?q?=F0=9F=8F=97=EF=B8=8F=20Add=20Jenkinsfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Jenkinsfile | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..e11ea01 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,64 @@ +pipeline { + agent any + + options { + timestamps() + } + + stages { + stage('Build (Java 8)') { + tools { + jdk 'OpenJDK 8' + } + steps { + sh './mvnw clean compile test-compile' + } + } + stage('Test (Java 8)') { + tools { + jdk 'OpenJDK 8' + } + steps { + sh './mvnw verify' + } + post { + always { + junit 'target/surefire-reports/*.xml' + jacoco classPattern: 'target/classes/*/main', sourcePattern: '**/src/main/' + recordCoverage(tools: [[parser: 'JACOCO', pattern: '**/jacoco.xml']]) + } + } + } + stage('Binary (Java 8)') { + tools { + jdk 'OpenJDK 8' + } + steps { + sh './mvnw -DskipTests=true package' + archiveArtifacts artifacts: 'target/jFCPlib-*.jar', fingerprint: true + } + } + stage('Compatibility (Java 17)') { + tools { + jdk 'OpenJDK 17' + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh './mvnw clean verity' + } + } + } + stage('Compatibility (Java 21)') { + tools { + jdk 'OpenJDK 21' + } + steps { + catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') { + sh './mvnw clean verify' + } + } + } + } +} + +// vi: ts=4 sw=4 et si -- 2.7.4