Convert Latex document to PDF using TexLive Docker image and Jenkins pipeline.
pipeline {
agent any
stages {
stage('TexLive') {
agent {
docker {
image 'texlive/texlive'
reuseNode true
}
}
steps {
writeFile encoding: 'utf-8', file: 'example.tex', text: '''\\documentclass{article}
\\begin{document}
Hello World!
\\end{document}'''
sh 'pdflatex example'
}
}
}
}