changes in jenkins file

This commit is contained in:
shikhar.s 2019-08-12 21:21:03 +05:30
parent ff36d380a5
commit 6d505f5a74

66
Jenkinsfile vendored
View File

@ -4,10 +4,10 @@ pipeline {
pollSCM('*/5 * * * 1-5')
}
options {
skipDefaultCheckout(true)
// skipDefaultCheckout(true)
// Keep the 10 most recent builds
buildDiscarder(logRotator(numToKeepStr: '10'))
timestamps()
// timestamps()
}
environment {
projectName = 'BitMessage'
@ -19,11 +19,11 @@ pipeline {
stages {
stage ('Checkout') {
steps {
checkout scm
}
}
// stage ('Checkout') {
// steps {
// checkout scm
// }
// }
stage ('Install_Requirements') {
@ -43,36 +43,36 @@ pipeline {
}
// stage ('Check_style') {
// steps {
// sh """
// if [ ! -d venv ] ; then
stage ('Check_style') {
steps {
sh """
if [ ! -d venv ] ; then
// virtualenv --python=python2.7 venv
// fi
// source venv/bin/activate
// export PYTHONPATH="$PWD:$PYTHONPATH"
virtualenv --python=python2.7 venv
fi
source venv/bin/activate
export PYTHONPATH="$PWD:$PYTHONPATH"
// pip install pylint
pip install pylint
// cd repo
// ### Need this because some strange control sequences when using default TERM=xterm
// export TERM="linux"
cd repo
### Need this because some strange control sequences when using default TERM=xterm
export TERM="linux"
// ## || exit 0 because pylint only exits with 0 if everything is correct
// pylint --rcfile=pylint.cfg $(find . -maxdepth 1 -name "*.py" -print) MYMODULE/ > pylint.log || exit 0
// """
// step([$class: 'WarningsPublisher',
// parserConfigurations: [
// [
// parserName: 'pylint',
// pattern: 'report/pylint.log'
// ]],
// unstableTotalAll: '0',
// usePreviousBuildAsReference: true
// ])
// }
// }
## || exit 0 because pylint only exits with 0 if everything is correct
pylint --rcfile=pylint.cfg $(find . -maxdepth 1 -name "*.py" -print) MYMODULE/ > pylint.log || exit 0
"""
step([$class: 'WarningsPublisher',
parserConfigurations: [
[
parserName: 'pylint',
pattern: 'report/pylint.log'
]],
unstableTotalAll: '0',
usePreviousBuildAsReference: true
])
}
}
stage('Test environment') {
steps {