node { stage('Pull git') { checkout scm } stage('Build PDF') { sh 'xelatex Mathematik-V-ZF.tex && xelatex Mathematik-V-ZF.tex' } stage('Archive PDF') { archiveArtifacts artifacts: 'Mathematik-V-ZF.pdf', followSymlinks: false } stage('Publish PDF') { sh 'scp -i /root/.ssh/id_rsa Mathematik-V-ZF.pdf thisfro@192.168.178.45:/opt/containers/apache2/html/download/latex-previews/mathematik-v-zf.pdf' } }