From c875f10c62c47753d51bface16c34b68e006d7b9 Mon Sep 17 00:00:00 2001 From: Dylan McMullen Date: Thu, 17 Oct 2024 10:52:02 -0400 Subject: [PATCH] fixing jenkinsfile --- Jenkinsfile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 740b2adb1..64eb4b6d1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,35 +1,30 @@ pipeline { - agent any - - triggers { - cron('H/10 * * * 1') // This triggers the job every 10 minutes on Mondays - } + agent any stages { + stage('Checkout') { + steps { + checkout scm + } + } stage('Build') { steps { script { - // Ensure you have Maven installed in your Jenkins instance sh 'mvn clean package' } } } - stage('Code Coverage') { steps { script { - // Run tests and generate code coverage report using Jacoco - sh 'mvn clean test jacoco:report' + sh 'mvn jacoco:report' } } } } - post { always { - // Archive the code coverage report - junit '**/target/surefire-reports/*.xml' // Adjust the path if necessary - publishCoverage adapters: [jacocoAdapter('**/target/jacoco.exec')] + archiveArtifacts artifacts: '**/target/site/jacoco/**', allowEmptyArchive: true } } }