This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.
The Jenkins Artifactory Plugin brings Artifactory's Build Integration support to Jenkins. This integration allows your build jobs to deploy artifacts automatically to Artifactory and have them linked to the build job that created them.
This plugin requires Artifactory 2.2.3 or later and Jenkins 1.358 or later.
First, we need to configure the Artifactory server(s) that we will use to deploy artifacts and build info to. We do this on Jenkins' system configuration page (Manage Jenkins -> Configure System).
Once at least one Artifactory server is configured we can add the plugin as a post-build step in a Maven 2/3 build. To do this, create or edit a Maven 2/3 build project.
Resolve artifacts from Artifactory, can be distinguish between repositories that resolves Snapshot artifacts and repositories that resolves Release artifacts.
You can use the Jenkins Gradle Plugin (configured under a free-style job) in conjunction with the Jenkins Artifactory Plugin and have your Gradle builds resolve artifacts from Artifactory and deploy artifacts and build information to Artifactory.
By using the Jenkins Ivy Plugin together with the Jenkins Artifactory Plugin your Ivy builds will publish artifacts and build information to Artifactory whenever an ivy:publish task is executed.
Publishing to your local file cache repository is the best way to go (i.e. you do not need to publish to Artifactory). The plugin will intercept the publish events and will replay them against Artifactory according to the configuration. Using an ivy:publish task that publishes directly to Artifactory will result in (redundant) double publishing.
Generic build integration provides Build Info support for any build type. This allows custom builds, such as non-Java builds to:
A multi-configuration project can be used to avoid duplicating many similar steps that would otherwise be made by different builds.
Here you can specify build combinations that you want to deploy through a Groovy expression that returns true or false.
The Artifactory plugin also supports release management for Maven and Gradle builds. Read detailed instructions here.
You use the Artifactory Pro License Control feature to discover and handle third party dependency licensing issues as part of the build.
The Jenkins plugin may be used in conjunction with the Jenkins JIRA plugin to record the build's affected issues, and include those issues in the Build Info descriptor inside Artifactory and as searchable properties on deployed artifacts.
It is possible to collect under a build deployed to Artifactory all JIRA issues affected by this build as well as previous builds. This allows you, for example, to see all issues between the previous release to the current build, and if the build is a new release build - to see all issues addresses in the new release.
When executing the same chain of integration (snapshot) builds in parallel, a situation may arise in which downstream builds resolve snapshot dependencies which are not the original dependencies existing when the build was triggered.
The Jenkins plugin offers a new checkbox for its Maven/Gradle builds 'Enable isolated resolution for downstream builds' which plants a new 'build.root' property that is added to the resolution URL.
In order for Maven to use the above feature, the checkbox needs to be checked for the root build only, and make sure that all artifacts are being resolved from Artifactory by using the 'Resolve artifacts from Artifactory' feature. This will enforce Maven to use the resolution URL with Maven builds, alongside with the 'build.root' property as a matrix param in the resolution URL.
Once the 'Enable isolated resolution for downstream builds' has been checked, the build.root property will be added to all existing resolvers.
The Jenkins project configuration lets you specify a policy for handling old builds.
You can delete old builds based on age or number as follows:
Once these parameters are defined, in the Post-build Actions section, you can specify that Artifactory should also discard old builds according to these settings as follows:
You can select text mode in which you can type out your target repository.
To see the Jenkins Artifactory Integration in action you can watch the following screencast.
Skip to end of metadata Go to start of metadata