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