Artifact packaging ignoring empty folders
Hey guys,
I'm creating an artifact after doing a dotnet publish, but it doesn't include what is on disk.
It's missing a folder that is created, but empty.
Is there some kind of "optimisation" that does not include empty folders in an artifact?
If that is the case, is there a switch to override this behaviour?
Cheers,
Steven
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Ilya Finkelshte... on 26 Oct, 2017 06:39 PM
Hi Steven,
This is default zip behavior, we did not introduce this intentionally. Anyway you can zip your folder manually with special
7z
switches and then package your own.zip
file as an artifact. This YAML worked for me:2 Posted by Steven on 27 Oct, 2017 08:11 AM
Thank you for the response Ilya.
I wasn't sure, hence the question.
I've been using 7zip on my desktop/laptop for a few years and had not noticed this, hence the confusion.
I will use the cmd to create the zip.
3 Posted by Steven on 30 Oct, 2017 12:57 PM
Hi Ilya, that did not work for me unfortunately... Any ideas?
4 Posted by Steven on 30 Oct, 2017 01:44 PM
I managed to figure it out:
I needed to add * to the path for the 7zip command
5 Posted by Ilya Finkelshte... on 30 Oct, 2017 05:34 PM
Thank you for update. However I am a little bit surprised that you were needed to update path. AppVeyor build worker images have path set to
7z
(not7zip
) command by default. I would recommend to ensure that you do not have commands which overwritepath
variable (instead of updating it).6 Posted by Steven on 31 Oct, 2017 08:37 AM
Hi Ilya, I meant the path to the folder to zip up,
i.e. in the case of your example it would look like this:
7z a -r -tzip contains-empty-folders.zip contains-empty-folders\*
7 Posted by Ilya Finkelshte... on 31 Oct, 2017 08:25 PM
I see, thanks for clarification.
Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:20 AM.