伪像排除特定非单词字符的模式

发布于 2025-01-25 21:53:14 字数 464 浏览 2 评论 0原文

背景

我们正在使用文物作为头盔图表的存储库。对于我们的特定头盔存储库,我想防止在文件名中使用下载的任何软件包上传,因为这会导致问题进一步。稍后,可能需要排除更多字符,但是我现在关注_,因为这是当前对我们引起问题的原因。

我尝试的

文物提供了一个排除模式选项,以排除包含一定模式的文件。我尝试输入*_*的许多变体作为排除模式,以排除所有包含文件名中任何地方的文件。不幸的是,这似乎不起作用,因为我上传的测试文件仍然可以上传罚款,并且仍显示在存储库中。但是,当我输入*t*作为排除模式时,名称中的所有文件都消失了。这告诉我排除本身的工作正常,而不是与下划线相关。

问题

是否有任何方法可以使用排除模式(或文物中的任何其他选项)来防止文件以名称上的下载方式上传?

Background

We're using Artifactory as a repository for Helm Charts among other things. For our specific Helm repo I would like to prevent any packages being uploaded with an underscore in the filename, as that causes issues further down the line. It's possible more characters will have to be excluded later, but I'm focusing on _ for now as that is what currently causes issues for us.

What I've tried

Artifactory offers an Exclude Pattern option to exclude files which contain a certain pattern. I have tried entering many variations of *_* as an Exclude Pattern in order to exclude all files containing an underscore anywhere in the filename. Unfortunately, this doesn't seem to work, since the test files I upload with an underscore still upload fine and are still shown in the repository. When, however, I enter *t* as an Exclude Pattern, all files with a t in the name disappear. This tells me the Excluding in itself works fine, just not with the underscore.

The Question

Is there any way to use the Exclude Pattern (or any other option in Artifactory) to prevent files from being uploaded with an underscore in the name?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十秒萌定你 2025-02-01 21:53:14

**/*_*工作。我不确定为什么在*_*不这样做时可以起作用,但是确实如此。

**/*_* works. I'm not entirely sure why that works when *_* doesn't, but it does.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文