jenkins file

This commit is contained in:
cis-kuldeep 2019-07-03 19:15:01 +05:30 committed by GitHub
parent f7e1601185
commit bb9c334add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 54 additions and 0 deletions

54
Jenkinsfile vendored Normal file
View File

@ -0,0 +1,54 @@
pipeline {
agent admin
triggers {
pollSCM('*/5 * * * *')
}
options {
skipDefaultCheckout(true)
// Keep the 10 most recent builds
buildDiscarder(logRotator(numToKeepStr: '10'))
timestamps()
}
environment {
PATH="/var/lib/jenkins/miniconda3/bin:$PATH"
}
stages {
stage ("Code pull"){
steps{
checkout scm
}
}
stage('Build environment') {
steps {
sh '''export WORKSPACE=`pwd`
source /home/cis/Desktop/ENV/pybitenv/bin/activate
pip install -r /home/cis/Desktop/Python/PyBitmessage/requirements.txt
'''
}
}
stage('Test environment') {
steps {
sh '''export WORKSPACE=`pwd`
source /home/cis/Desktop/ENV/pybitenv/bin/activate
cd /home/cis/Desktop/Python/PyBitmessage
sudo python setup.py install
sudo /home/cis/.local/bin/nosetests --with-xunit tests
'''
}
}
stage('Test Run') {
steps {
sh '''python /home/cis/Desktop/Python/PyBitmessage/src/bitmessagemain.py -t
'''
}
}
}
post {
failure {
echo "Send e-mail, when failed"
}
}
}