fix jenkinsfile version update
This commit is contained in:
parent
c4e2077839
commit
1cda2cb501
|
|
@ -41,6 +41,7 @@ pipeline {
|
||||||
stage('Build docker image') {
|
stage('Build docker image') {
|
||||||
steps {
|
steps {
|
||||||
sh "docker build -f Dockerfile -t pfsdn:${VERSION} ."
|
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"
|
sh "docker save pfsdn:${VERSION} | gzip > pfsdn-${VERSION}.tar.gz"
|
||||||
archiveArtifacts artifacts: "pfsdn-${VERSION}.tar.gz", fingerprint: true
|
archiveArtifacts artifacts: "pfsdn-${VERSION}.tar.gz", fingerprint: true
|
||||||
|
|
||||||
echo "Saving pfapp artifact launcher/target/${VERSION}.pfapp"
|
echo "Saving pfapp artifact target/${VERSION}.pfapp"
|
||||||
archiveArtifacts artifacts: "launcher/target/${VERSION}.pfapp", fingerprint: true
|
archiveArtifacts artifacts: "target/${VERSION}.pfapp", fingerprint: true
|
||||||
|
|
||||||
echo "TODO: deploy ${VERSION}.pfapp to repository (not implemented yet)"
|
echo "TODO: deploy ${VERSION}.pfapp to repository (not implemented yet)"
|
||||||
}
|
}
|
||||||
|
|
@ -61,12 +62,7 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
always {
|
success {
|
||||||
script {
|
|
||||||
if (VERSION ==~ /^\d+\.\d+\.\d+\.\d+$/) {
|
|
||||||
sh "docker rmi pfsdn:${VERSION} || true"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cleanWs()
|
cleanWs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue