2018-06-13 19:57:04 +00:00
|
|
|
pipeline {
|
|
|
|
agent { label 'docs' }
|
|
|
|
environment {
|
|
|
|
PYENV_ROOT = "/usr/local/pyenv"
|
|
|
|
PATH = "$PYENV_ROOT/bin:$PATH"
|
|
|
|
}
|
|
|
|
stages {
|
2018-06-19 22:55:05 +00:00
|
|
|
stage('github-pending') {
|
|
|
|
steps {
|
|
|
|
githubNotify credentialsId: 'test-jenkins-credentials',
|
|
|
|
description: 'Testing docs...',
|
|
|
|
status: 'PENDING',
|
|
|
|
context: "jenkins/pr/docs"
|
|
|
|
}
|
|
|
|
}
|
2018-06-13 19:57:04 +00:00
|
|
|
stage('setup') {
|
|
|
|
steps {
|
|
|
|
sh 'eval "$(pyenv init -)"; pyenv install 2.7.14 || echo "We already have this python."; pyenv local 2.7.14; pyenv shell 2.7.14'
|
|
|
|
sh 'eval "$(pyenv init -)"; pip install sphinx -e .'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('build') {
|
|
|
|
steps {
|
|
|
|
sh 'eval "$(pyenv init -)"; make -C doc clean html'
|
2018-06-26 17:53:55 +00:00
|
|
|
archiveArtifacts artifacts: 'doc/_build/html/'
|
2018-06-13 19:57:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
2018-06-29 18:07:08 +00:00
|
|
|
always {
|
|
|
|
cleanWs()
|
|
|
|
}
|
2018-06-13 19:57:04 +00:00
|
|
|
success {
|
2018-06-19 20:58:38 +00:00
|
|
|
githubNotify credentialsId: 'test-jenkins-credentials',
|
|
|
|
description: 'The docs job has passed',
|
|
|
|
status: 'SUCCESS',
|
|
|
|
context: "jenkins/pr/docs"
|
2018-06-13 19:57:04 +00:00
|
|
|
}
|
|
|
|
failure {
|
2018-06-19 20:58:38 +00:00
|
|
|
githubNotify credentialsId: 'test-jenkins-credentials',
|
|
|
|
description: 'The docs job has failed',
|
|
|
|
status: 'FAILURE',
|
|
|
|
context: "jenkins/pr/docs"
|
2018-06-13 19:57:04 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|