11

Can Artifactory be used as "SCM" or source in Jenkins to trigger the builds on an particular artifact deploy?

Don't see (or miss it) anything similar in the Artifactory Jenkis plugin description (and on Jenkins side)

This could be needed for instance if there is only access to the Artifactory repository and not to the SCM with code the binaries are coming from.

Such functionality looks to be availble for Nexus (via nexus-webhook-plugin). Hard to believe that this feature is missing for Artifactory.

2 Answers 2

6

It's maybe not as elegant as a hook, but I believe the URLTrigger Plugin will achieve what you're looking for. Listed in their use cases:

This plugin enables users to check if new artifacts (such as binaries) have been deployed in a repository (managed for example by a repository manager such as Sonatype Nexus, JFrog Artifactory, Apache Archiva and so on).

It allows you to check the last modification date and inspect the contents of the response for changes.

You would have to use a polling interval instead of relying on Artifactory to notify Jenkins via a hook, but in my experience polling is relatively innocuous even with lots of polls at high intervals.

1
  • Can it be used to trigger Jenkins job from Nexus repo when repo is updated, in similar way we trigger Jenkins job using git Feb 6, 2019 at 5:15
3

Now you can use Enable Artifactory trigger in a newer version.

Go to Build Triggers and check the Enable Artifactory trigger checkbox.

enter image description here

More Detail on GitHub Support for Artifactory trigger

4
  • I'm not getting any options in the "Artifactory server" dropdown. Where do I add the "artifactory servers"?
    – David Berg
    May 25, 2021 at 13:45
  • Have you installed the Jenkins Artifactory plugin?
    – Corey
    May 26, 2021 at 11:53
  • 1
    Yes! However I found the issue. The "Artifactory server" had to be added under "Manage Jenkins -> Configure system" (translated from swedish, so not sure if that is the exact phrasing in english).
    – David Berg
    May 26, 2021 at 13:52
  • Is it possible to use a global env var in the Paths to Watch field?
    – Stew C
    Sep 27, 2022 at 22:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.