diff --git a/Jenkinsfile b/Jenkinsfile index 39f7ae1..3aaf8e5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -152,10 +152,12 @@ pipeline { stage('Create Archive') { steps { dir(env.GIT_PATH) { - if (params.ARCHIVE_FORMAT == 'zip') { - sh "zip -q ${env.ARCHIVE_FILENAME} diplomarbeit.pdf* spellcheck-results.txt" - } else { - sh "tar -czf ${env.ARCHIVE_FILENAME} diplomarbeit.pdf* spellcheck-results.txt" + script { + if (params.ARCHIVE_FORMAT == 'zip') { + sh "zip -q ${env.ARCHIVE_FILENAME} diplomarbeit.pdf* spellcheck-results.txt" + } else { + sh "tar -czf ${env.ARCHIVE_FILENAME} diplomarbeit.pdf* spellcheck-results.txt" + } } } }