From eed3904d96ee930bf044e98b4782e2d910c43717 Mon Sep 17 00:00:00 2001 From: zontreck Date: Thu, 12 Sep 2024 15:03:36 -0700 Subject: [PATCH] Add a jenkinsfile with build instructions --- Jenkinsfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..43ad96e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,50 @@ +pipeline { + agent any + + options { + buildDiscarder( + logRotator( + numToKeepStr: '5' + ) + ) + } + + stages { + stage("Build on Linux") { + agent { + label 'linux' + } + + tools { + jdk "jdk17" + } + + steps { + script { + sh ''' + #!/bin/bash + + git clean -xfd + git reset --hard + git fetch + + java -version + + chmod +x gradlew + ./gradlew -Dorg.gradle.java.home="$JAVA_HOME" build publish + + ''' + } + } + + post { + always { + archiveArtifacts artifacts: "build/libs/*.jar" + deleteDir() + } + } + + + } + } +}