From 57f1eb1ac5e815a20a9eebacea3e8dcd22fe5498 Mon Sep 17 00:00:00 2001 From: Clemens Lauermann Date: Thu, 16 Apr 2020 15:54:33 +0200 Subject: [PATCH] fix sollte fuer template durchbauen --- Jenkinsfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 169fc24..2c156f5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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() } } }