Artifactory Plugin

Skip to end of metadata
Go to start of metadata

Plugin Information

Plugin ID artifactory Changes In Latest Release
Since Latest Release
Latest Release
Latest Release Date
Required Core
Dependencies
2.2.1
Nov 03, 2013
1.521
git (version:1.1.14, optional)
ant (version:1.2, optional)
ivy (version:1.17, optional)
gradle (version:1.15, optional)
perforce (version:1.3.7, optional)
jira (version:1.29, optional)
subversion (version:1.43, optional)
maven-plugin (version:1.521)
Source Code
Issue Tracking
Maintainer(s)
GitHub
Open Issues
Yossi Shaul (id: yossis)
Usage Installations 2013-Apr 3133
2013-May 3301
2013-Jun 3402
2013-Jul 3501
2013-Aug 3514
2013-Sep 3598
2013-Oct 3745
2013-Nov 3671
2013-Dec 3668
2014-Jan 3963
2014-Feb 4053
2014-Mar 4271

This plugin allows deploying Maven 2, Maven 3, Ivy and Gradle artifacts and build info to the Artifactory artifacts manager.

Reporting Issues
Issues for this plugin are managed primarily on the plugin's project under the JFrog JIRA.
Managing independent release versions and having sub-components for each build technology requires the plugin to be a first-level JIRA project, which is currently not possible under the Jenkins-provided JIRA.


TABLE OF CONTENTS

Introduction

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.
As part of deployment additional information is recorded by the plugin to give you full visibility of deployed artifacts, used dependencies and information about original build environment. As an important side affect the plugin also supports optimized end-of-build-only deployment.
The plugin uses the Artifactory REST API for build management that can be used by other clients as well.
To learn more about the Artifactory-side of the Jenkins Artifactory Plugin, please read the documentation on the JFrog wiki.

Requirements

This plugin requires Artifactory 2.2.3 or later and Jenkins 1.358 or later.
Release management and build isolation requires Artifactory 2.3.3 or later and Jenkins 1.400 or later.
The plugin currently supports Maven 2, Maven 3, Gradle and Ivy-Ant builds.

Configuring Artifactory Server(s)

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).
Locate the "Artifactory servers" configuration section, click the "Add" button and fill-in the Artifactory url and optionally a username and password that will be used to query Artifactory for a list of target repositories (this is only required if Artifactory is configured not to allow anonymous access).
You can also set the default deployer credentials (and the default resolver credentials used by some build types) that will be used by individual jobs when publishing and resolving to/from Artifactory.

Configuring Maven 2 and Maven 3 Builds

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.

Maven 3 Support for Jenkins Free-style Jobs
The Jenkins Artifactory plugin supports running Maven 3 builds from free-style jobs by using a Maven 3 build step + a build environment section for the Artifactory Maven 3 integration (artifact and build information deployment). For Maven 3 builds users are encouraged to configure the Artifactory integration using Jenkins' native Maven 2/3 build projects.

Configuring Gradle Builds

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.

Configuring Ivy-Ant Builds

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.

Install the Jenkins Ivy Plugin
To use the Jenkins Artifactory Plugin with Ivy builds you need to install the Jenkins Ivy Plugin.

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.

Configuring Generic (Freestyle) Builds

Generic build integration provides Build Info support for any build type. This allows custom builds, such as non-Java builds to:

  1. Publish any artifacts to Artifactory, together with custom properties metadata, and keep published artifacts associated with the Jenkins build.
  2. Resolve artifacts from Artifactory that are required by your build.
    The 'Published Artifacts' section lets you specify which artifact files produced by the build will be published to Artifactory.
    At the end of the build run, artifacts in the build's workspace directory will be selected according to the specified patterns and will be published to Artifactory.

    The 'Resolved Artifacts' section lets you specify which artifact files you wish to resolve from Artifactory.
    Before the build starts, Jenkins will download these artifacts from Artifactory so the build can use them as dependencies.

    Optionally, you can also map the target path of deployed/resolved artifacts.

Release Management with Staging and Promotion

The Artifactory plugin also supports release management for Maven and Gradle builds. Read detailed instructions here.

License Control

You use the Artifactory Pro License Control feature to discover and handle third party dependency licensing issues as part of the build.
Check the 'Run license checks' option if wish that Artifactory will scan and check the licenses of all dependencies used by this build. If you wish to inform selected users about any license violations detected while scanning, you may enter a white-spaced list of e-mail addresses to the notification recipients text box.

JIRA Integration

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.
To activate the JIRA integration, make sure that Jenkins is set with a valid JIRA site configuration and select the Enable JIRA Integration in the job configuration page:

Aggregating Issues from Previous Builds

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.
To accumulate JIRA issues across builds, check the "Aggregate issues from previous builds" option and configure the last build status the aggregation should begin from. The default last status is "Released" (case insensitive), which means aggregation will begin from the first build after the last "Released" one.

Build Isolation

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.
This can happen when a root upstream build has run and triggered downstream builds that depend on its produced artifacts. Then the upstream has run again before the running downstream builds has finished, so these builds may resolve newly created upstream artifacts that are not meant for them, leading to conflicts.

Solution

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.
This property will then be read by the direct children of this build and implanting them in their resolution URLs respectively, thus guaranteeing that the parent artifact resolved is the one that was built prior to the build being run.

Maven

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.

Gradle

Once the 'Enable isolated resolution for downstream builds' has been checked, the build.root property will be added to all existing resolvers.

Excluded artifacts and the BuildInfo


By default when providing exclude patterns for artifacts, they will not get deployed into Artifactory but they will get included in the final BuildInfo JSON.
By marking the "Filter excluded artifacts from build Info" the excluded artifacts will appear in a different section inside the BuildInfo and by this providing a clear understanding of the entire Build.
This is also crutial for the promotion procedure, since it scans your BuildInfo JSON and trying to promote all the artifacts there, it will fail when you excluded artifacts unless you mark this option.

Discarding Old Builds

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:

Days to keep builds The number of days that a build should be kept before it is deleted
Max # of builds to keep The maximum number of builds that should be kept. When a new build is created, the oldest one will be deleted

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:

Discard old builds from Artifactory Configures Artifactory to discard old builds according to the Jenkins project settings above
Discard build artifacts Configures Artifactory to also discard the artifacts within the build

Watch the Screencast

To see the Jenkins Artifactory Integration in action you can watch the following screencast.

Changelog

2.2.1 (11 Nov 2013)

  1. Fix for IllegalArgumentException in Deployment when no deployment is defined in Job (HAP-241)

2.2.0 (16 Oct 2013)

  1. Fix parent pom resolution issue (HAP-236) from Jenkins 1.521
  2. Add support for maven 3.1.X
  3. Option to ignore artifacts that are not deploy because of include/exclude patterns from the build info (HAP-444)
  4. Enable credentials configuration for repository listing per project (HAP-430)
  5. Bug fixes

2.1.8 (26 Aug 2013)

  1. Fix migration to Jenkins 1.528 (HAP-428)

2.1.7 (31 Jul 2013)

  1. Maven build failure during deployment (HAP-420)
  2. Bug fixes (HAP-406)

2.1.6 (24 Jun 2013)

  1. Fix plugin compatibility with Jenkins 1.519 (HAP-418)

2.1.5 (23 Apr 2013)

  1. Black duck integration - Automatic Black duck Code-Center integration for open source license governance and vulnerability control (HAP-394)
  2. Gradle 1.5 support for maven and ivy publishes - New 'artifactory-publish' plugin with fully supported for Ivy and Maven publications (GAP-138)
  3. Bug fixes (HAP-341, HAP-390, HAP-366, HAP-380)

2.1.4 (03 Feb 2013)

  1. Generic resolution interpolates environment variables (HAP-352)
  2. Broken link issues (HAP-362,HAP-371,HAP-360)
  3. Minor bug fixes

2.1.3 (14 Oct 2012)

  1. Support include/exclude patterns of captured environment variables (BI-143)
  2. Bug fixes (HAP-343,HAP-4,GAP-136)

2.1.2 (08 Aug 2012)

  1. Aggregating Jira issues from previous builds (HAP-305)
  2. Bug fixes and improvements in generic deploy (HAP-319, HAP-329)

2.1.1 (31 May 2012)

  1. NPE on Maven2 builds (HAP-316)

2.1.0 (24 May 2012)

  1. Support for cloudbees 'Folder plugin' (HAP-312,HAP-313)
  2. Minor bug fixes

2.0.9 (15 May 2012)

  1. Fix UI integration for Jenkins 1.463+ (HAP-307)
  2. Minor bug fixes

2.0.8 (09 May 2012)

  1. Integration with Jira plugin (HAP-297)
  2. Support build promotion for all build types (HAP-264)
  3. Ability to leverage custom user plugins for staging and promotion (HAP-271, HAP-272)

2.0.7 (20 Apr 2012)

  1. Generic artifact resolution (based on patterns or other builds output) to freestyle builds (HAP-292)
  2. Optimized deploy - when a binary with the same checksum as an uploaded artifact already exists in the Artifactory storage, a new local reference will be created instead of reuploading the same content
  3. Bug fixes

2.0.6 (19 Mar 2012)

  1. Support Perforce in release management (HAP-265)
  2. Generic artifacts deployment (HAP-153)
  3. Bug fixes

2.0.5 (08 Dec 2011)

  1. Compatible with Gradle 1.0-milestone-6
  2. Different Artifactory servers can be used for resolution and deployment (HAP-203)
  3. Using the new Jenkins user cause class to retrieve triggering user. Requires Jenkins 1.428 or above (HAP-254)
  4. Release management with Git work with the latest plugin. Requires Git plugin v1.1.13 or above (HAP-259, JENKINS-12025)
  5. Build-info exports an environment variable 'BUILDINFO_PROPFILE' with the location of the generated build info properties file

2.0.4 (15 Aug 2011)

  1. Compatible with Jenkins 1.424+ (HAP-223)
  2. Resolved Maven 3 deployments intermittently failing on remote nodes (HAP-220)
  3. Target repository for staged builds is now respected for Maven 3 builds (HAP-219)
  4. Remote builds no longer fail when "always check out a fresh copy" is used (HAP-224)

2.0.3 (26 Jul 2011)

  1. Support for Git Plugin v1.1.10+ (HAP-217)
  2. Native maven 3 jobs doesn't work if the Jenkins home path contains spaces (HAP-218)
  3. Wrong tag URL is used when changing scm element during staged build (HAP-215)

2.0.2 (07 Jul 2011)

  1. Support Jenkins version 1.417+ (HAP-211)

2.0.1 (19 May 2011)

  1. Maven deployment from remote slaves - artifact deployment for Maven builds will run directly from a remote slave when artifact archiving is turned off, saving valuable bandwidth and time normally consumed by copying artifacts back to master for archiving and publishing (requires Maven 3.0.2 and above)
  2. Staging of Maven builds now correctly fails if snapshot dependencies are used in POM files (HAP-183)
  3. All staging and promotion commit comments are now customizable (HAP-181)
  4. Fix for staged builds failing on remote slaves (HAP-189)

2.0.0 (4 May 2011)

  1. Release management with staging and promotion support
  2. Support for forcing artifact resolution in Maven 3 to go through Artifactory (HAP-144)
  3. Isolated resolution for snapshot build chains for Maven and Gradle
  4. Ability to attach custom properties to published artifacts (HAP-138)
  5. Improved Ant/Ivy integration
  6. Improved Gradle integration
  7. Support saving pinned builds (HAP-129, HAP-140)
  8. Option to delete deployed artifacts when synchronizing build retention (HAP-161)

1.4.3 (7 Apr 2011)

  1. Compatible to work with Jenkins 1.405 (HAP-159)

1.4.2 (27 Jan 2011)

  1. The plugin now works with Jenkins' new native Maven 3 jobs (HAP-130, HAP-131)

1.4.1 (10 Jan 2011)

  1. Synchronize the build retention policy in Artifactory with Jenkins' build retention settings (requires Artifactory Pro) (HAP-90)

1.4.0 (09 Jan 2011)

  1. Improved Gradle support
  2. Optimized checksum-based publishing with Artifactory 2.3.2+ that saves redeploying the same binaries (RTFACT-3808)
  3. Remote agent support for Gradle, Maven 3 and Ivy builds (HAP-59, HAP-60, HAP-114)
  4. Configurable ivy/artifact patterns for Ivy builds (HAP-120)

1.3.6 (21 Nov 2010)

  1. Allow specifying include/exclude patterns for published artifacts (HAP-61).
  2. Support for custom Ivy/artifact patterns for Gradle published artifacts (HAP-108).

1.3.5 (7 Nov 2010)

  1. Fixed integration with Jenkins maven release plugin. (HAP-93)
  2. Global Artifactory credentials (HAP-53)
  3. Auto preselect target release and snapshot repositories. (HAP-98)

1.3.4 (28 Oct 2010)

  1. Fixed Gradle support

1.3.3 (21 Oct 2010)

  1. Update version of the Gradle extractor.

1.3.2 (19 Oct 2010)

  1. Support for running license checks on third-party dependencies and sending license violation email notifications (HAP-91)

1.3.1 (19 Sep 2010)

  1. Maven 2 and Maven 3 support two target deploy repositories - releases and snapshots (HAP-29)
  2. Maven 2 - Allow deployment even if the build is unstable (HAP-77)
  3. Link to the build info next to each build that deployed build info (HAP-80)
  4. Link to the builds list in the jobs' main page (HAP-41)
  5. Allow skipping the creation and deployment of the build info (HAP-47)

1.3.0 (26 Aug 2010)

  1. New support for Maven 3 Beta builds!

1.2.0 (26 Jul 2010)

  1. New support for Ivy builds! (many thanks to Timo Bingaman for adding the hooks to the the Jenkins Ivy Plugin)
  2. Supporting incremental builds (HAP-52)
  3. Testing connection to Artifactory in the main configuration page
  4. Update Jenkins dependency to version 1.358
  5. Fixed HAP-51 - tar.gz files were deployed as .gz files

1.1.0 (09 Jun 2010)

  1. Added support for gradle jobs, see: http://www.jfrog.org/confluence/x/tYK5
  2. Connection timeout setting changed from milliseconds to seconds.
  3. Allow bypassing the http proxy (issue #5892)

1.0.7 (04 Mar 2010)

  1. Improved Artifactory client
  2. Another fix for duplicate pom deployments
  3. Sending parent (upstream) build information
  4. Displaying only local repositories when working with Artifactory 2.2.0+

1.0.6 (16 Feb 2010)

  1. Fixed a bug in the plugin that in some cases skipped deployment of attached artifacts
  2. In some cases, pom were deployed twice
  3. MD5 hash is now set on all files
  4. Dependency type is passed to the build info

1.0.5 (22 Jan 2010)

  1. Using Jackson as JSON generator for BuildInfo (will fix issues with Hudson version 1.340-1.341)

1.0.4 (15 Jan 2010)

  1. Accept Artifactory urls with slash at the end
  2. Fixed JSON object creation to work with Hudson 1.340

1.0.3 (07 Jan 2010)

  1. Using preemptive basic authentication

1.0.2 (22 Dec 2009)

  1. Configurable connection timeout

1.0.1 (16 Dec 2009)

  1. Fixed Artifactory plugin relative location (for images and help files)

1.0.0 (14 Dec 2009)

  1. First stable release

Labels

Edit
plugin-upload plugin-upload Delete
plugin-report plugin-report Delete
plugin-buildwrapper plugin-buildwrapper Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Add Comment