Use ZipFile.CreateFromDirectory for reliable subdirectory inclusion in zip
This commit is contained in:
Vendored
+1
-1
@@ -41,7 +41,7 @@ pipeline {
|
||||
|
||||
stage('Deploy to Azure') {
|
||||
steps {
|
||||
bat 'powershell -Command "Compress-Archive -Path publish\\* -DestinationPath deploy.zip -Force"'
|
||||
bat 'powershell -Command "Add-Type -Assembly System.IO.Compression.FileSystem; if (Test-Path deploy.zip) { Remove-Item deploy.zip }; [System.IO.Compression.ZipFile]::CreateFromDirectory(\'publish\', \'deploy.zip\')"'
|
||||
withCredentials([azureServicePrincipal(
|
||||
credentialsId: 'azure-pcl',
|
||||
subscriptionIdVariable: 'AZ_SUB_ID',
|
||||
|
||||
Reference in New Issue
Block a user