Use ZipFile.CreateFromDirectory for reliable subdirectory inclusion in zip

This commit is contained in:
2026-05-04 22:08:32 -04:00
parent be5717ebe2
commit 87a235ed1d
Vendored
+1 -1
View File
@@ -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',