Skip to content

Commit

Permalink
Update Jenkinsfile to handle zip files by unzipping before log replay
Browse files Browse the repository at this point in the history
  • Loading branch information
egorvas committed Dec 16, 2024
1 parent c34fe95 commit 06194c8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ pipeline {
steps {
script {
withFileParameter('FILE'){
sh 'mv $FILE ${WORKSPACE}/nginx.log'
if (params.FILE_FILENAME.endsWith('.zip')) {
sh 'mv $FILE ${WORKSPACE}/nginx.zip'
sh 'unzip ${WORKSPACE}/nginx.zip -d ${WORKSPACE}'
} else {
sh 'mv $FILE ${WORKSPACE}/nginx.log'
}
sh """
node index.js \\
--filePath nginx.log \\
--filePath ${WORKSPACE}/nginx.log \\
--ratio $RATIO \\
--prefix $PREFIX \\
$CUSTOM_OPTIONS
Expand Down

0 comments on commit 06194c8

Please sign in to comment.