Closed johnpenmanweb closed 7 years ago
https://github.com/openalm/Extension-UtilitiesPack/blob/master/Utilites/Zip/zip.ps1
It uses the .net compression function which is a one liner and it does handle sub directories. Please run these two commands with variables set properly to see whether it is succeeding or not.
Add-Type -A System.IO.Compression.FileSystem [IO.Compression.ZipFile]::CreateFromDirectory($pathToZipFolder, $pathToZipFile)
TFS 2015 Update 2 On Prem.
Using Zip A Folder Build Step
Getting the following error: 2016-08-15T13:49:11.5749241Z ##[error]The given path's format is not supported. Does it matter if there are sub directories in the folder I am trying to zip?
Properties Page: Path to Folder: Tried hard coded as shown and using TFS variables to same path e:\Build\Hybris\hybris\bin\Custom\8\a\ Path to the zip file: Tried hard coded as shown and using TFS variables to Staging path e:\Builds\$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)\custom.zip
Advanced: Overwrite zip file: True
Control Options: Enabled True, all others false
I've done a dir of the folder that is to be zip to make sure there are files, results listed in attached file:
1_Build.txt