Triggering Jenkins builds when deploying artifacts to Artifactory

While you could use the URLTrigger Plugin in Jenkins to poll for artifact updates in Artifactory, another way of triggering your build would be through User Plugins.

All it requires is a simple Groovy script that you place under the /opt/jfrog/artifactory/etc/plugins directory on your Artifactory server. In this script simply call your Jenkins job via an http request, to which you can optionally pass parameters, either within the GET URL or inside the POST body.

An example can be found in “Replicate docker images from Artifactory to Google Container Registry“.

Leave a Reply

Your email address will not be published.