Skip to content

Commit

Permalink
Cleans up WS on beginning and after each JDK stage
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszlenart committed Feb 13, 2020
1 parent 306def2 commit 668843e
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ pipeline {
pollSCM 'H/15 * * * *'
}
stages {
stage('Clean Up') {
steps {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
stage('JDK 11') {
agent {
label 'ubuntu'
Expand All @@ -25,11 +30,6 @@ pipeline {
MAVEN_OPTS = "-Xmx1024m"
}
stages {
stage('Clean Up') {
steps {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
stage('Build') {
steps {
sh 'mvn -B package -DskipTests -DskipAssembly'
Expand All @@ -48,6 +48,11 @@ pipeline {
}
}
}
post {
always {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
}
stage('JDK 9') {
agent {
Expand All @@ -61,11 +66,6 @@ pipeline {
MAVEN_OPTS = "-Xmx1024m"
}
stages {
stage('Clean Up') {
steps {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
stage('Build') {
steps {
sh 'mvn -B clean package -DskipTests -DskipAssembly'
Expand All @@ -84,6 +84,11 @@ pipeline {
}
}
}
post {
always {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
}
stage('JDK 8') {
agent {
Expand All @@ -97,11 +102,6 @@ pipeline {
MAVEN_OPTS = "-Xmx1024m"
}
stages {
stage('Clean Up') {
steps {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
stage('Build') {
steps {
sh 'mvn -B clean package -DskipTests -DskipAssembly'
Expand Down Expand Up @@ -152,8 +152,12 @@ pipeline {
}
}
}
post {
always {
cleanWs deleteDirs: true, patterns: [[pattern: '**/target/**', type: 'INCLUDE']]
}
}
}
/*
post {
// If this build failed, send an email to the list.
failure {
Expand Down Expand Up @@ -203,5 +207,4 @@ pipeline {
}
}
}
*/
}
}

0 comments on commit 668843e

Please sign in to comment.