Clean up
esbo_ds/ESBO-ETC/pipeline/head There was a failure building this commit Details

This commit is contained in:
Lukas Klass 2020-07-22 08:13:28 +02:00
parent 5c2f46e84d
commit d6eaed389b
1 changed files with 13 additions and 9 deletions

22
Jenkinsfile vendored
View File

@ -11,19 +11,19 @@ pipeline {
agent {
dockerfile {
filename "Dockerfile"
args "-u root" //needed to get around permission issues
}
}
steps {
// Install dependencies
sh '''
virtualenv pyenv
. pyenv/bin/activate
virtualenv venv
. venv/bin/activate
pip3 install -r requirements.txt
'''
// run tests
sh '''
export PYTHONPATH=`pwd`
pyenv/bin/python3 -m unittest discover test
venv/bin/python3 -m unittest discover ${TEST_DIR}
'''
}
}
@ -32,24 +32,25 @@ pipeline {
agent {
dockerfile {
filename "Dockerfile"
args "-u root" //needed to get around permission issues
}
}
steps {
// Install dependencies
sh '''
virtualenv pyenv
. pyenv/bin/activate
virtualenv venv
. venv/bin/activate
pip3 install -r requirements.txt
'''
// clear out old files
sh 'rm -rf ${BUILD_DIR}'
sh 'rm -f ${SPHINX_DIR}/sphinx-build.log'
// build docs
sh '''
pyenv/bin/sphinx-build \
venv/bin/sphinx-build \
-w ${SPHINX_DIR}/sphinx-build.log \
-b html ${SPHINX_DIR}/${SOURCE_DIR} ${SPHINX_DIR}/${BUILD_DIR}
'''
// stash build result
stash includes: 'docs/build/html/**/*.*', name: 'html'
}
post {
@ -58,13 +59,16 @@ pipeline {
}
}
}
stage('Deploy') {
stage('Deploy Docs') {
agent {
label 'lunjaserv'
}
steps {
// unstash build results from previous stage
unstash 'html'
// remove old files
sh 'rm -rf /opt/esbo-etc/html/*'
// copy new files
sh 'cp -rf docs/build/html /opt/esbo-etc/'
}
}