diff --git a/Jenkinsfile b/Jenkinsfile index ed9cd40..ab7e4e2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -41,6 +41,7 @@ pipeline { stage('Build docker image') { steps { sh "docker build -f Dockerfile -t pfsdn:${VERSION} ." + sh "docker rmi pfsdn:${VERSION} || true" } } @@ -51,8 +52,8 @@ pipeline { sh "docker save pfsdn:${VERSION} | gzip > pfsdn-${VERSION}.tar.gz" archiveArtifacts artifacts: "pfsdn-${VERSION}.tar.gz", fingerprint: true - echo "Saving pfapp artifact launcher/target/${VERSION}.pfapp" - archiveArtifacts artifacts: "launcher/target/${VERSION}.pfapp", fingerprint: true + echo "Saving pfapp artifact target/${VERSION}.pfapp" + archiveArtifacts artifacts: "target/${VERSION}.pfapp", fingerprint: true echo "TODO: deploy ${VERSION}.pfapp to repository (not implemented yet)" } @@ -61,12 +62,7 @@ pipeline { } post { - always { - script { - if (VERSION ==~ /^\d+\.\d+\.\d+\.\d+$/) { - sh "docker rmi pfsdn:${VERSION} || true" - } - } + success { cleanWs() } }