Closed wass3rw3rk closed 5 months ago
it seems like you need to help the artifactory library we are using along a bit more during its rootpath check here https://github.com/jfrog/jfrog-client-go/blob/d0fbc99300a1f5d743eb79aaa76ab7d678a09030/utils/utils.go#L99. if you don't encapsulate the part that contains the regexp with parenthesis, it won't work. it won't break the path segment and consider the whole value as the root path.
indeed, digging in their docs for the CLI which uses the same library we are (https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-for-jfrog-artifactory/generic-files), i found this under the --regexp
flag:
If you have specified that you are using regular expressions, then the beginning of the expression must be enclosed in parenthesis. For example: a/b/c/(.*)/file.zip
so, we might just want to augment our docs to say the same.
in the given example then, providing file_(\d{4}-\d{2}-\d{2}).yml
should yield the desired behavior assuming that you have a file in the location matching that pattern.
Description
The artifactory plugin claims to have functionality to define a regexp pattern for the sources for an upload action. Using a step such as:
results in an error such as:
Note: the double error of "path does not exist" is how it shows up.
Value
The plugin should work as advertised
Useful Information
Adding a simple test case to the upload test here https://github.com/go-vela/vela-artifactory/blob/main/cmd/vela-artifactory/upload_test.go will confirm the issue.
vela --version
?