-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using ANT patterns when uploading #918
Comments
Thanks for sharing this requirement! Would you like to try it out and let us know? |
Hi Eyal,
Thank you for your reply! I had not tried that. It is great to hear this might already be in place.
I tried a couple of tests cases for exclusion that we have and noticed the below:
When using this exclude pattern “**/dir/**/*.txt” the following doesn’t get excluded: dir/a.txt. As far as I know, ** should match 0 or more directories.
I’ve also got a question on the inclusion. Is there a way to pass in multiple include patterns? So far I’ve been able to include by using a pattern in the first argument to the upload command. But I’m not sure how to do multiple include patterns.
Thank you,
Maria
|
Hi @mariakoleva, For passing multiple include patterns for the jfrog rt upload command , I recommend using File Specs. See Example 4: Upload, which uploads files to Artifactory from two different local paths. You can then pass the file spec path to the command using the --spac option. As for the example you showed, in which you provided the “**/dir/**/*.txt” pattern, this is actually one of the ways ANT patterns differ from plain wildcard patterns. Changing the pattern you provided to either “dir/*.txt” or “*dir/*.txt” will match "dir/a.txt". And if you need to be more specific, you can provide multiple patterns. Please let me know if this helps. |
Hi, Thank you for your reply. I haven't tried file specs but they look useful for passing in multiple patterns. I suppose this feature request can be amended to a request to support ANT patterns in file specs. Unfortunately, changing from ANT patterns to plain wildcard patterns is not an option for us. We have a large number of CI jobs using ANT patterns which we are switching over to Artifactory. It's not feasible to change all of them to wildcard patterns. Thanks, Maria |
@mariakoleva, |
Hi @eyalbe4, Thank you for adding this! I finally had the chance to test the new --ant option. I tested 25 use cases with it, and only found a few issues. I've raised all of those as support tickets already but I'm happy to share the ticket numbers with you if that will be helpful. |
Thank you for the feedback @mariakoleva! |
As am trying this, is there support for variable matching too, e.g.
|
supporting ANT patterns when uploading is already supported. |
We have a use case to upload parts of a directory tree to Artifactory by excluding and including files and directories using ANT patterns. We need to provide a way to our users to specify multiple ANT patterns to be excluded from their upload and multiple ANT patterns to be the only files/directories included in their upload.
I'd like to see an option on the upload JFrog CLI command similar to the --exclusions option but supporting ANT patterns instead of regular expressions. I'd also like to see a similar --inclusions option that works with ANT patterns.
At the moment we are doing pattern matching ourselves, before creating a compressed archive of the directory tree and passing that to the JFrog CLI upload command. However, we are seeing bad performance with this implementation and think this can be sped up if it was implemented as part of the JFrog CLI command.
This is related to issue #867 - that is the other feature request needed for the same use case.
The text was updated successfully, but these errors were encountered: