From fb0e9300c85b9ee3f41af16efbcc0fbda7d22fc8 Mon Sep 17 00:00:00 2001 From: tursom Date: Thu, 8 Aug 2024 18:43:06 +0800 Subject: [PATCH] add Jenkinsfile --- Jenkinsfile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..709ec7d --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,22 @@ +pipeline { + agent { + docker { + image 'openjdk:21' + args '-v /root/.gradle:/root/.gradle' + } + } + stages { + stage('Build') { + steps { + sh './gradelw publish' + script { + try { + archiveArtifacts artifacts: "**/build/libs/*.jar",fingerprint: true, followSymlinks: false, onlyIfSuccessful: true + } catch (Exception err) { + echo err.toString() /* hudson.AbortException: Couldn't find any revision to build. Verify the repository and branch configuration for this job. */ + } + } + } + } + } +} \ No newline at end of file