From 4ab08e2faf40d049a67e30724a08b8d4bf4b6795 Mon Sep 17 00:00:00 2001 From: Westin Miller Date: Tue, 22 Aug 2017 23:43:07 -0700 Subject: [PATCH] Automatically create zip file --- Jenkinsfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a60848d..aa222c8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,6 +37,9 @@ node { } stage('Archive') { - archive 'bin/x64/Release/Torch.*' + bat "IF EXIST bin\\torch-${BRANCH_NAME}.zip DEL bin\\torch-${BRANCH_NAME}.zip" + bat "powershell -Command \"Add-Type -Assembly System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory(\\\"\$PWD\\bin\\x64\\Release\\\", \\\"\$PWD\\bin\\torch-${BRANCH_NAME}.zip\\\")\"" + archiveArtifacts artifacts: 'bin/torch-${BRANCH_NAME}.zip', caseSensitive: false, fingerprint: true, onlyIfSuccessful: true + archiveArtifacts artifacts: 'bin/x64/Release/Torch*', caseSensitive: false, fingerprint: true, onlyIfSuccessful: true } -} +} \ No newline at end of file