Add docs test/build
Integrate the doc build in the new secop job TODO: Check the publishing part Change-Id: I361ec085aad04b5155bb3f972b329dd2a7445aaa Reviewed-on: https://forge.frm2.tum.de/review/18661 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Reviewed-by: Bjoern Pedersen <bjoern.pedersen@frm2.tum.de>
This commit is contained in:

committed by
Bjoern Pedersen

parent
f1fef1e50f
commit
bfe6aa364f
@ -7,6 +7,7 @@ RUN apt-get update && \
|
|||||||
git \
|
git \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
make \
|
make \
|
||||||
|
locales \
|
||||||
python \
|
python \
|
||||||
python-dev \
|
python-dev \
|
||||||
python-virtualenv \
|
python-virtualenv \
|
||||||
@ -33,10 +34,13 @@ RUN virtualenv /home/jenkins/secopvenv && \
|
|||||||
FROM base AS docs
|
FROM base AS docs
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
USER root
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y --no-install-suggests --no-install-recommends \
|
apt-get install -y --no-install-suggests --no-install-recommends \
|
||||||
texlive-latex-extra \
|
texlive-latex-extra \
|
||||||
texlive-latex-base \
|
texlive-latex-base \
|
||||||
texlive-latex-recommended \
|
texlive-latex-recommended \
|
||||||
|
texlive-fonts-recommended \
|
||||||
texlive-base \
|
texlive-base \
|
||||||
texlive-binaries
|
texlive-binaries \
|
||||||
|
latexmk
|
||||||
|
65
ci/Jenkinsfile
vendored
65
ci/Jenkinsfile
vendored
@ -64,6 +64,59 @@ make test
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def run_docs() {
|
||||||
|
stage('check links') {
|
||||||
|
sh '''
|
||||||
|
. /home/jenkins/secopvenv/bin/activate
|
||||||
|
make -C doc linkcheck
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
stage('build html') {
|
||||||
|
sh '''
|
||||||
|
. /home/jenkins/secopvenv/bin/activate
|
||||||
|
make -C doc html
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
stage('build singlehtml') {
|
||||||
|
sh '''
|
||||||
|
. /home/jenkins/secopvenv/bin/activate
|
||||||
|
make -C doc singlehtml
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
stage('build latexpdf') {
|
||||||
|
sh '''
|
||||||
|
. /home/jenkins/secopvenv/bin/activate
|
||||||
|
make -C doc latexpdf
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
stage('build man') {
|
||||||
|
sh '''
|
||||||
|
. /home/jenkins/secopvenv/bin/activate
|
||||||
|
make -C doc man
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
stage('store html doc for build') {
|
||||||
|
publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: true, reportDir: 'doc/_build/html', reportFiles: 'index.html', reportName: 'Built documentation', reportTitles: ''])
|
||||||
|
gerritverificationpublisher([
|
||||||
|
verifyStatusValue: 1,
|
||||||
|
verifyStatusCategory: 'test ',
|
||||||
|
verifyStatusName: 'doc',
|
||||||
|
verifyStatusReporter: 'jenkins',
|
||||||
|
verifyStatusRerun: '@recheck'
|
||||||
|
])
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('publish') {
|
||||||
|
if (GERRIT_EVENT_TYPE == 'change-merged')
|
||||||
|
{
|
||||||
|
sh '''
|
||||||
|
rsync -rlv doc/_build/* /share/ictrl/public/doc/secop
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
node("master") {
|
node("master") {
|
||||||
stage('clean workspace')
|
stage('clean workspace')
|
||||||
@ -90,18 +143,26 @@ node("master") {
|
|||||||
}
|
}
|
||||||
stage('(re-)generate image') {
|
stage('(re-)generate image') {
|
||||||
sh '''#!/bin/bash
|
sh '''#!/bin/bash
|
||||||
git worktree add tmpmaster origin/master
|
git worktree add tmpmaster refs/changes/61/18661/8
|
||||||
cd tmpmaster
|
cd tmpmaster
|
||||||
docker build --target base --tag secop_base:latest ci
|
docker build --target base --tag secop_base:latest ci
|
||||||
|
docker build --target docs --tag secop_docs:latest ci
|
||||||
cd ..
|
cd ..
|
||||||
rm -rf tmpmaster
|
rm -rf tmpmaster
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('execute tests') {
|
stage('execute tests') {
|
||||||
|
|
||||||
|
parallel 'Test': {
|
||||||
img = docker.image('secop_base:latest')
|
img = docker.image('secop_base:latest')
|
||||||
img.inside {
|
img.inside {
|
||||||
run_tests('python2')
|
run_tests('python2')
|
||||||
}
|
}},
|
||||||
|
'Docs': {
|
||||||
|
img = docker.image('secop_docs:latest')
|
||||||
|
img.inside {
|
||||||
|
run_docs()
|
||||||
|
}}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user