jfrog / jenkins-artifactory-plugin

Jenkins artifactory plugin
http://jenkins-ci.org/
114 stars 186 forks source link

Accept wildcard in the Artifactory Trigger #360

Open felipecrs opened 3 years ago

felipecrs commented 3 years ago

It would be great if I could watch Artifactory for changes using wildcards in the Path to watch, just like the JFrog CLI.

As example, in this setting: image (pic from https://www.jfrog.com/confluence/display/JFROG/Jenkins+Artifactory+Plug-in#JenkinsArtifactoryPlug-in-TriggeringBuilds)

I would like to use generic-libs-local/builds/starship/*.rpm, so I would only trigger the job if a new .rpm gets pushed. Otherwise, even a .txt would trigger the job.

emguy commented 3 years ago

This is a nice one to have. Very in demand!

nick-schultz commented 2 years ago

Just came across needing this as well. Would like to know the scope of the change, and I may be able to help. Is it limited to just the Trigger code itself, or would it extend to server as well?

felipecrs commented 2 years ago

I know that jfrog CLI supports wildcards in the queries, so I guess the plugin should also be able to.

nick-schultz commented 2 years ago

so, I tracked it down to the REST API call in the build-info repo, here

It's using the REST API's ItemLastModified, which does not provide an option for globs.

I guess we could use File List to get a listing of a particular path from the server, and then perform a glob locally. That seems a bit much, however.

nstod commented 2 years ago

I'm wanting to use wildcards, as well. Has anyone found a good workaround for this?