fix breaking typo in 6266a90

This commit is contained in:
Clemens Lauermann 2020-04-27 18:43:41 +02:00
parent b799df6f84
commit 898ce6ecab

13
Jenkinsfile vendored
View File

@ -24,7 +24,7 @@ pipeline {
) )
choice( choice(
name: 'ARCHIVE_FORMAT', name: 'ARCHIVE_FORMAT',
choices: ['diplomarbeit.zip', 'diplomarbeit.tar.gz'], choices: ['zip', 'tar.gz'],
description: 'Archiv-Typ als der die Arbeit per Mail versandt wird') description: 'Archiv-Typ als der die Arbeit per Mail versandt wird')
} }
@ -63,6 +63,9 @@ pipeline {
// be sure branch is set // be sure branch is set
env.GIT_BRANCH = params.GIT_BRANCH ?: '*/master' env.GIT_BRANCH = params.GIT_BRANCH ?: '*/master'
// output archive filename
env.ARCHIVE_FILENAME = "diplomarbeit." + params.ARCHIVE_FORMAT
} }
} }
} }
@ -149,10 +152,10 @@ pipeline {
stage('Create Archive') { stage('Create Archive') {
steps { steps {
dir(env.GIT_PATH) { dir(env.GIT_PATH) {
if (param.ARCHIVE_FORMAT == 'diplomarbeit.zip') { if (params.ARCHIVE_FORMAT == 'zip') {
sh "zip -q diplomarbeit.zip diplomarbeit.pdf* spellcheck-results.txt" sh "zip -q ${env.ARCHIVE_FILENAME} diplomarbeit.pdf* spellcheck-results.txt"
} else { } else {
sh "tar -czf diplomarbeit.tar.gz diplomarbeit.pdf* spellcheck-results.txt" sh "tar -czf ${env.ARCHIVE_FILENAME} diplomarbeit.pdf* spellcheck-results.txt"
} }
} }
} }
@ -178,7 +181,7 @@ pipeline {
} }
} }
dir(env.GIT_PATH) { dir(env.GIT_PATH) {
emailext attachmentsPattern: "${param.ARCHIVE_FORMAT}", emailext attachmentsPattern: "${env.ARCHIVE_FILENAME}",
to: "${env.RECIPIENTS}", to: "${env.RECIPIENTS}",
subject: "[${currentBuild.currentResult}] Diplomarbeit Build #${env.BUILD_NUMBER}", subject: "[${currentBuild.currentResult}] Diplomarbeit Build #${env.BUILD_NUMBER}",
body: "Job ${env.JOB_NAME}: ${env.JOB_URL}" body: "Job ${env.JOB_NAME}: ${env.JOB_URL}"