首页 > 解决方案 > jenkins - 如何停用区分大小写以获取匹配项

问题描述

我在我的工作中添加了这个存档工件步骤

 archiveArtifacts 'BUILD/**/*.*'

得到以下错误:

ERROR: No artifacts found that match the file pattern "BUILD/**/*.*". 
Configuration error?
ERROR: ‘BUILD/**/*.*’ doesn’t match anything because it is treated case 
sensitively. You can deactivate case sensitivity to get matches

问题是我使用了所有大写字母,并且在我更新后它运行良好。

我的问题是如何禁用区分大小写以获取匹配项?

标签: jenkins

解决方案


在 Jenkins 管道中,如果您想以archiveArtifacts不区分大小写的方式使用该步骤,您可以这样称呼它(如手册中所述):

archiveArtifacts artifacts: 'BUILD/**/*.*', caseSensitive: false

推荐阅读