Clean workspace after each build
@@ -19,7 +19,6 @@ pipeline {
script {
try {
checkout scm
- sh 'rm -rf *.tar.gz stash'
sh 'docker image prune -f'
sh 'make ci-lint'
sh 'make ci-test'
@@ -40,6 +39,11 @@ pipeline {
}
}
}
+ post {
+ always {
+ deleteDir()
+ }
+ }
}
stage('Test') {
parallel {
@@ -49,11 +53,15 @@ pipeline {
}
steps {
dir('src/github.com/docker/lunchbox') {
- deleteDir()
unstash 'e2e'
sh './docker-app-e2e-linux'
}
}
+ post {
+ always {
+ deleteDir()
+ }
+ }
}
stage("Test Mac") {
agent {
@@ -61,11 +69,15 @@ pipeline {
}
steps {
dir('src/github.com/docker/lunchbox') {
- deleteDir()
unstash 'e2e'
sh './docker-app-e2e-darwin'
}
}
+ post {
+ always {
+ deleteDir()
+ }
+ }
}
stage("Test Win") {
agent {
@@ -73,11 +85,15 @@ pipeline {
}
steps {
dir('src/github.com/docker/lunchbox') {
- deleteDir()
unstash "e2e"
bat 'docker-app-e2e-windows.exe'
}
}
+ post {
+ always {
+ deleteDir()
+ }
+ }
}
}
}
@@ -90,13 +106,17 @@ pipeline {
}
steps {
dir('src/github.com/docker/lunchbox') {
- deleteDir()
sh 'rm -f *.tar.gz'
unstash 'artifacts'
echo "Releasing $TAG_NAME"
release('docker/lunchbox')
}
}
+ post {
+ always {
+ deleteDir()
+ }
+ }
}
}
}
