fix jenkinsfile version update
This commit is contained in:
parent
c4e2077839
commit
1cda2cb501
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue