Jenkinsfile.jdk11: Added a clean stage to the pipeline
@@ -43,8 +43,21 @@ pipeline {
disableConcurrentBuilds()
}
+ parameters {
+ booleanParam(name: 'CLEAN', defaultValue: true, description: 'Perform the build in clean workspace')
+ }
+
stages {
+ stage('Clean workspace') {
+ when {
+ expression { params.CLEAN }
+ }
+ steps {
+ sh 'git clean -fdx'
+ }
+ }
+
stage('Build & Deploy') {
steps {
sh "./mvnw $MAVEN_PARAMS -Dmaven.test.skip.exec=true clean install"
