Jenkins工件插件不会归档空目录 [英] Jenkins artifact plugin does not archive empty directories

查看:672
本文介绍了Jenkins工件插件不会归档空目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Jenkins工件插件向下流使用.我的问题是,尽管我付出了所有努力,但空文件夹没有被存档.显然.svn文件也不会存档.

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.

推荐答案

首先,您是正确的-空目录无法归档,因为在詹金斯中,目录实际上没有任何意义.

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

如果要将工件复制到另一个作业,则可以仅在另一个作业中创建目录,或者通过添加一个.keep文件(或类似文件)并添加到要归档的工件列表中.

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.

关于第二点,即未归档.svn文件或目录,这也是正确的,因为 default 行为是在归档时排除某些模式(例如.git*~)文物.

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.

要禁用此行为,请单击归档工件"构建后步骤下方的 Advanced…按钮,然后取消选中使用默认排除"选项.然后,您的.svn工件可以被存档.

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.

这篇关于Jenkins工件插件不会归档空目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆