fix sollte fuer template durchbauen

This commit is contained in:
Clemens Lauermann 2020-04-16 15:54:33 +02:00
parent 9fac572c1f
commit 57f1eb1ac5

15
Jenkinsfile vendored
View File

@ -20,6 +20,12 @@ pipeline {
string(name: 'BRANCH', defaultValue: 'master', description: 'Branch')
}
stages {
stage('Clean checkout of the template') {
steps{
cleanWs()
checkout scm
}
}
stage('Checkout DA') {
when {
expression { '.git' != params.REPOSITORY }
@ -44,11 +50,11 @@ pipeline {
}
stage('Build only template') {
when {
expression { '.git' == params.Repository }
expression { '.git' == params.REPOSITORY }
}
steps {
sh '''
mkdir HTLLE-DA-Vorlage && mv * HTLLE-DA-Vorlage
mkdir -p HTLLE-DA-Vorlage && mv `ls | grep -v HTLLE-DA-Vorlage` HTLLE-DA-Vorlage
cp -rv HTLLE-DA-Vorlage/example/* .
make pdf -C HTLLE-DA-Vorlage SOURCEDIR=$(pwd)
'''
@ -56,17 +62,16 @@ pipeline {
}
stage('Test if diplomarbeit.pdf was build') {
steps {
sh "test -f output/diplomarbeit.pdf"
sh "test -f diplomarbeit.pdf"
}
}
}
post {
always {
emailext attachLog: true, attachmentsPattern: 'output/**',
emailext attachLog: true, attachmentsPattern: 'diplomarbeit.pdf',
body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}",
recipientProviders: [requestor()],
subject: "Jenkins Diplomarbeit Build ${currentBuild.currentResult}"
cleanWs()
}
}
}