pipeline { agent any options { buildDiscarder logRotator(numToKeepStr: '4') } tools { gradle 'Gradle-6.8.3' jdk 'jdk-8' } stages { stage ('Build') { steps { checkout scm sh "gradle -Dgrails.env=production --no-daemon clean" //sh "gradle -Dgrails.env=test --no-daemon check" sh "gradle -Dgrails.env=production --no-daemon assemble --refresh-dependencies" } post { success { // The artifact is named $project.projectDir which could be any number of things on Jenkins archiveArtifacts(artifacts: "build/libs/*.war", fingerprint: true) } } } } }