From d011d181e25ffc28635e2e7861750fc44cb979b5 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 29 Jul 2025 04:59:02 -0400 Subject: [PATCH] fix: jenkins --- Jenkinsfile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..583c4313 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,47 @@ +pipeline { + agent any + tools { + // Specify the Gradle version configured in Jenkins + gradle 'Gradle' + // Specify the JDK version configured in Jenkins + jdk 'Java 21' + } + stages { + stage('Checkout') { + steps { + // Checkout code from SCM (e.g., Git) + checkout scm + } + } + stage('Build') { + steps { + // Run Gradle build + sh './gradlew clean build' + } + } + stage('Publish Artifacts') { + when { + // Only publish for main branch + branch 'main' + } + steps { + // Archive build artifacts + archiveArtifacts artifacts: 'build/libs/*.jar', allowEmptyArchive: true + } + } + } + post { + always { + // Clean workspace after build + cleanWs() + } + success { + // Notify on success + echo 'Build and tests completed successfully!' + } + failure { + // Notify on failure + echo 'Build or tests failed!' + } + } +} \ No newline at end of file