pipeline { agent any environment { JAVA_HOME='/usr/lib/jvm/temurin-17-jdk-amd64/' } options { buildDiscarder(logRotator(numToKeepStr: '48', artifactNumToKeepStr: '96')) timeout(time: 12, unit: 'MINUTES') } triggers { pollSCM('*/10 * * * *') } stages { stage('Build') { steps { echo 'Cleaning...' sh './gradlew clean' echo 'Building..' sh './gradlew build --stacktrace -Dloom.refresh=true' } } stage('Deploy') { steps { echo 'Deploying....' dir('remappedJars') { archiveArtifacts artifacts:'*.jar', fingerprint: false } } } } }