How do I trigger Jenkins builds when I deploy artifacts?

If you want to trigger a Jenkins build when you deploy artifacts, there is a Jenkins plugin called URLTrigger that can be configured to watch for changes on a certain URL, and can be used as a build trigger.

For example, you can configure it to watch for changes in the returned JSON file from the File List REST API, that is accessed via the following URI –

http://localhost:8081/artifactory/api/storage/<PATH_TO_FOLDER_OR_REPO>/

The plugin can be configured to poll for changes on this URL periodically, and trigger the build if two consecutive calls have returned different JSONs (they will be different if a new artifact has been deployed).

Make sure to fill in the credentials in the plugin configuration for the plugin to be able to authenticate when requesting for the File List.