Files
znc/Jenkinsfile
T
Alexey Sokolov 8a9ee77239 Jenkins should clean workspace before new build
if build agent is reused
2016-09-17 10:51:36 +01:00

41 lines
1.1 KiB
Groovy

#!groovy
node('freebsd') {
// freebsd 10.3 + pkg install git openjdk cmake icu pkgconf swig30 python3
timestamps {
try {
timeout(time: 30, unit: 'MINUTES') {
def srcdir = pwd()
def tmpdir = pwd([tmp: true])
stage('Checkout') {
// https://issues.jenkins-ci.org/browse/JENKINS-32540
sh 'git clean -ffdx'
checkout scm
sh 'git submodule update --init --recursive'
}
stage('Build') {
dir("$tmpdir/build") {
sh "cmake $srcdir -DWANT_PERL=ON -DWANT_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$tmpdir/install-prefix"
sh 'make VERBOSE=1 all'
}
}
stage('Unit test') {
dir("$tmpdir/build") {
sh 'make unittest'
}
}
stage('Integration test') {
dir("$tmpdir/build") {
sh 'make install'
// TODO: run make inttest
}
}
}
currentBuild.result = 'SUCCESS'
} catch (err) {
echo "Error: ${err}"
currentBuild.result = 'FAILURE'
}
}
}