added Jenkinsfile

This commit is contained in:
Ziver Koc 2016-12-12 17:41:31 +01:00
parent f042c41609
commit ee6d940147

32
Jenkinsfile vendored Normal file
View file

@ -0,0 +1,32 @@
Jenkinsfile (Pipeline Script)
node {
checkout scm
stage('Build') {
sh 'ant clean'
sh 'ant build'
}
stage('Test') {
try {
sh 'ant test'
} finally {
step([$class: 'JUnitResultArchiver', testResults: 'build/reports/*.xml'])
}
}
stage('Package') {
sh 'ant package'
archiveArtifacts artifacts: 'build/production/Zallery.war', fingerprint: true
}
stage('Deploy') {
if (currentBuild.result == 'SUCCESS') {
input 'Deploy?', submitter 'Administrator'
sh 'ant deploy'
}
}
}