Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins artifact plugin does not archive empty directories

I use the Jenkins artifact plugin to downward streams to use. My problem is that despite all my efforts, empty folders are not being archived. Apparently .svn files are also not archived.

like image 473
user1340582 Avatar asked May 06 '15 12:05

user1340582


1 Answers

Firstly, you are correct — empty directories cannot be archived, as a directory doesn't really make sense as an artifact in Jenkins.

If you're copying the artifacts to another job, you can just create the directory in the other job, or ensure the directory is archived in the first place by adding a .keep file (or so) and adding **/.keep to your list of artifacts to archive.


Regarding your second point that .svn files or directories are not archived, that is also correct since the default behaviour is to exclude certain patterns (e.g. .git, *~) when archiving artifacts.

To disable this behaviour, click on the Advanced… button below the "Archive the artifacts" post-build step, and uncheck the "Use default excludes" option. Then your .svn artifacts can be archived.

like image 169
Christopher Orr Avatar answered Sep 22 '22 18:09

Christopher Orr