The CloudBees CD/RO Artifactory plugin integrates with JFrog Artifactory to provide a single location for teams to manage all of their binary artifacts efficiently. For more information about JFrog Artifactory please refer to the Artifactory documentation.
The CloudBees CD/RO Artifactory plugin integrates with Artifactory, making it easy to model applications in CloudBees CD/RO, referencing artifacts stored in Artifactory, with support for numerous repository layouts. When a request for deployment is made in CloudBees CD/RO, the platform seamlessly retrieves the relevant artifacts from Artifactory as part of the deploy process. Users have the flexibility to:
-
Reference specific versions in Artifactory.
-
Configure the deployment to always retrieve the latest version.
-
Dynamically determine the versions to deploy at runtime.
This flexibility enables different use cases, such as using the latest version to schedule automatic deployments of nightly build outputs to QA environments every morning.
In CloudBees CD/RO, versions are stored in the environment inventory, recording the exact versions of each artifact that has been deployed to an environment, to easily track and audit what is deployed where. The SmartDeploy feature in CloudBees CD/RO compares the inventory with the artifact versions being deployed, and only deploys any new artifact versions to that specific environment for efficient and safe deployments.
CloudBees CD/RO automatically captures a version of the entire application, including individual artifact versions pulled from Artifactory, in a snapshot. Using a snapshot in deployments guarantees consistency across environments, so you can have the same components and configuration in staging environments, as well as in production. These tight integrations of Artifactory versions feeding into model-driven processes and capabilities in CloudBees CD/RO provide visibility, reliable deployments, and ensures repeatability and fidelity across all the environments and processes throughout the pipeline. This ensures that teams can deploy to production with confidence.
Plugin Version 1.8.0.2023090544
Revised on October 19, 2023
Supported versions
The plugin has been tested with JFrog Artifactory version 5.x. Since the plugin integrates with Artifactory using a Rest API, Artifactory versions that are compatible with the 5.x Rest API are expected to work, although not tested. In addition, since some features are available only in the professional version of Artifactory, it is expected that exercising those features in the plugin require a professional version of Artifactory.
Updated Perl version required
This plugin is using an updated version of Perl with the cb-perl shell, and requires CloudBees CD/RO agent version 10.3+ in order to work.
Creating plugin configurations
Plugin configurations are sets of parameters that apply across some or all of the plugin procedure. They reduce repetition of common values, create predefined parameter sets for end users, and securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.
To create plugin configurations in CloudBees CD/RO, complete the following steps:
-
Navigate to
to open the Plugin Manager. -
Select the Configurations tab to open the Configurations page.
-
Select + in the upper right corner to create a new configuration.
-
In the New Configuration window, specify a Name for the configuration.
-
Select the Project that the configuration belongs to.
-
Optionally, add a Description for the configuration.
-
Select the appropriate Plugin for the configuration.
-
Configure the procedure parameters.
Procedures
Get Latest Artifact Version
Performs a GAVC search in Artifactory for the specified artifact and saves the latest version to a property.
This procedure requires an Artifactory Pro license. |
Parameter | Description |
---|---|
Configuration |
The previously defined configuration name. For example, config. |
Repository package type |
The type of repository. NuGet, NPM, Maven, PHP, and generic repository types are supported. |
Repository key |
The repository key. For example, |
Organization Path |
Represents the Organization field where the levels are separated by path separators ( |
Artifact |
A sequence of literals that identifies the artifact’s module, basically, the artifact’s name. |
Classifier |
A sequence of literals that identifies the artifact’s classifier. This parameter is required if the Repository Package Type is Maven. |
Result Property |
Name or the property where the latest version is saved. The default is |
Here is the Get Latest Artifact Version procedure and an example usage:
Here are the procedure logs for a successful run:
Publish Artifact to Artifactory
Publishes a single artifact to the Artifactory instance. NuGet, NPM, Maven, PHP, and generic repository types are supported.
Parameter | Description | ||
---|---|---|---|
Configuration |
The previously defined configuration name. For example, config. |
||
Repository package type |
The type of repository. NuGet, NPM, Maven, PHP, and generic repository types are supported. |
||
Repository key |
The repository key. For example, |
||
Use Repository Layout |
Select to use custom repository layouts. |
||
Organization Path |
Represents the Organization Path separated by
|
||
Module |
A sequence of literals that identifies the artifact’s module. For example,
|
||
Base Revision |
A sequence of literals that identifies the base revision portion of the artifact version, excluding any integration information. For example,
|
||
Folder Integration Revision |
A sequence of literals that identifies the integration revision used in folder names in the artifact’s path, excluding the base revision. For example, in the case of an integration revision
|
||
File Integration Revision |
A sequence of literals that identifies the integration revision part in the artifact’s file name, excluding the base revision. For example, in the case of an integration revision |
||
Classifier |
A sequence of literals that identifies the artifact’s classifier. For example,
|
||
Extension |
A sequence of literals that identifies the artifact’s extension. For example,
|
||
Artifact Layout |
The layout path pattern used for artifact resolution and publication paths. For example,
|
||
Artifact Tokens |
The token path pattern used for artifact resolution. Tokens can consist of a combination of string literals, path separators, parentheses, punctuation characters, etc. For example, for the artifact
|
||
Artifact Path |
The path to the artifact binary on the resource file system. For example, |
||
Artifact Properties |
Artifact properties that facilitate searching for them using JFrog’s "Smart Searches". For more information, refer to Property Sets. Properties can be added in the following format:
|
||
Result Property Sheet |
Property sheet where procedure results should be saved. Contains a record with the following fields in JSON-format:
For example:
|
Artifact token layout example
Suppose you need to publish a snapshot named my_plugin-current-tests.jar
per the following URL:
http://localhost:8081/artifactory/webapp/#/artifacts/browse/tree/General/libs-snapshot-local/com/electriccloud/ec-specs-plugins-core/1.5.3-SNAPSHOT/my_plugin-1.5.3-20180919.122321-1-tests.jar
You need to supply the following input parameters:
Field | Value |
---|---|
Repository Key |
libs-snapshot-local |
Organization Path |
com/electriccloud |
Module |
ec-specs-plugins-core |
Base Revision |
1.5.3 |
Folder Integration Revision |
SNAPSHOT |
File Integration Revision |
20180919.122321-1 |
Classifier |
tests |
Extension |
jar |
For a generic repository package type, you can enter the following input parameters for the Publish Artifact to Artifactory procedure:
After the job is complete, the following summary appears:
For a Maven repository package type, you can enter the following input parameters for the Publish Artifact to Artifactory procedure:
After the job is complete, the following summary appears:
Publish Multiple Artifacts to Artifactory
Publishes one or more artifacts whose Repository Package Type is Generic to Artifactory.
Parameter | Description | ||
---|---|---|---|
Configuration |
The previously defined configuration name. For example, config. |
||
Repository Key |
The repository key. For example, |
||
Use Repository Layout |
Select to use custom repository layouts. |
||
Organization Path |
Represents the Organization Path separated by
|
||
Module |
A sequence of literals that identifies the artifact’s module. For example,
|
||
Base Revision |
A sequence of literals that identifies the base revision part of the artifact version, excluding any integration information. For example,
|
||
Extension |
A sequence of literals that identifies the artifact’s extension. For example,
|
||
Artifact Layout |
The layout path pattern used for artifact resolution and publication paths. For example,
|
||
Artifact Tokens |
The token path pattern used for artifact resolution. Tokens can consist of a combination of string literals, path separators, parentheses, punctuation characters, etc. For example, for the layout
|
||
Artifacts Directory |
The path to the artifact binary directory on the resource file system. For example, |
||
Artifact Properties |
The artifact properties that facilitate searching them through JFrog "Smart Searches". For more information, refer to Property Sets. Properties can be added in the following format:
|
||
Result Property Sheet |
The property sheet where procedure results should be saved. It contains a list of records with following fields in JSON-format:
For example:
|
Below is an example of the Publish Multiple Artifacts to Artifactory procedure that does not use the repository layout.
After the job is complete, the following summary appears:
In this example, the Publish Multiple Artifacts to Artifactory procedure is configured to use the repository layout.
After the job is complete, the following summary appears:
Retrieve Artifact from Artifactory
Retrieves the exact or the latest version of the artifact from the Artifactory instance. Supports NuGet, NPM, Maven, PHP, and generic repositories.
Parameter | Description | ||
---|---|---|---|
Repository package type |
The type of repository. NuGet, NPM, Maven, PHP, and generic repository types are supported. |
||
Configuration |
The previously defined configuration name. For example, config. |
||
Repository key |
The repository key. For example, |
||
Organization Path |
Represents the Organization field where the levels are separated by path separators ( |
||
Module |
A sequence of literals that identifies the artifact’s module, which is essentially the artifact’s name. |
||
Version |
Exact version to be downloaded or latest version flag, if the latest version retrieval logic is available for the repository.
|
||
File Integration Revision |
A sequence of literals that identifies the integration revision portion of the artifact’s file name, excluding the base revision. |
||
Folder Integration Revision |
A sequence of literals that identifies the integration revision portion used in folder names in the artifact’s path, excluding the base revision. |
||
Type |
A sequence of literals that identifies the artifact’s type. This is typically used when the artifact’s extension cannot be reused as the artifact’s type. |
||
Extension |
A sequence of literals that identifies the artifact’s extension. For example, nupkg. Required, if the path is mandatory for the layout. |
||
Classifier |
A sequence of literals that identifies the artifact’s classifier. |
||
Retrieve to Directory |
Download the artifact version to a specific directory. If not defined, the artifact is downloaded into the current directory. If the specified directory does not exist, it is created. This path may be absolute or relative. For example, |
||
Overwrite? |
If selected, the existing package is overwritten. |
||
Uncompress and Extract? |
If selected, the retrieved package is extracted into the specified directory. Available for NuGet, NPM, and PHP Composer. If the Retrieve to Directory parameter is not set, the package is extracted into the current workspace. A new folder is created for the artifact, with the name
For NuGet, the extracted package files may appear like this:
|
||
Retrieved Artifact Location Property |
The name or property sheet path used by the step to create a property sheet. This property sheet stores information about the retrieved artifact version, including its location in the file system. Properties are saved under
If an artifact has some properties coming from Artifactory, they are also saved under this property sheet. |
Component definition
The EC-Artifactory plugin can be used to define a component in CloudBees CD/RO. To create a component, select EC-Artifactory in the dropdown for Content Location in the component definition.
NuGet example
In Artifactory, the artifact appears like this, where com/company
is the organization and artifact
is the name of the module:
Here is an example of the Retrieve Artifact from Artifactory procedure:
After the job is complete, the following summary appears:
Maven example
Here is an example of a Maven artifact in Artifactory:
Here is an example of the Retrieve Artifact from Artifactory procedure:
After the job is complete, the following summary appears:
Here are the job logs:
Using plugin EC-Artifactory-1.0.0.0 Got parameter "artifact" with value "bookstore" Got parameter "classifier" with value "" Got parameter "config" with value "config" Got parameter "destination" with value "" Got parameter "extension" with value ".war" Got parameter "extract" with value "0" Got parameter "fileItegRev" with value "" Got parameter "folderItegRev" with value "SNAPSHOT" Got parameter "latestVersion" with value "1" Got parameter "org" with value "" Got parameter "orgPath" with value "hello" Got parameter "overwrite" with value "0" Got parameter "repoType" with value "Maven" Got parameter "repository" with value "libs-snapshot-local" Got parameter "repositoryPath" with value "" Got parameter "resultPropertySheet" with value "/myJob/retrievedArtifactVersions/" Got parameter "type" with value "" Got parameter "useRepositoryLayout" with value "1" Got parameter "version" with value "" Artifact path is /hello/bookstore/0.0.1-SNAPSHOT/bookstore-0.0.1-20170705.104709-2.war Artifact URL: http://10.200.1.102:8081/artifactory/libs-snapshot-local//hello/bookstore/0.0.1-SNAPSHOT/bookstore-0.0.1-20170705.104709-2.war Downloading http://10.200.1.102:8081/artifactory/libs-snapshot-local//hello/bookstore/0.0.1-SNAPSHOT/bookstore-0.0.1-20170705.104709-2.war into the job workspace Set property "/myJob/retrievedArtifactVersions/bookstore/fullFilename" to value "/opt/electriccloud/electriccommander/workspace/job_37132_20171121022959/bookstore-0.0.1-20170705.104709-2.war" Set property "/myJob/retrievedArtifactVersions/bookstore/filename" to value "bookstore-0.0.1-20170705.104709-2.war" Set property "/myJob/retrievedArtifactVersions/bookstore/version" to value "0.0.1-SNAPSHOT" Set property "/myJob/retrievedArtifactVersions/bookstore/url" to value "http://10.200.1.102:8081/artifactory/libs-snapshot-local//hello/bookstore/0.0.1-SNAPSHOT/bookstore-0.0.1-20170705.104709-2.war" Set property "/myJob/retrievedArtifactVersions/bookstore/snapshotVersion" to value "0.0.1-20170705.104709-2"
NPM example
Here is an example of an NPM artifact in Artifactory:
Here is an example of the Retrieve Artifact from Artifactory procedure:
After the job is complete, the following summary appears:
Here are the job logs:
Using plugin EC-Artifactory-1.0.0.0 Got parameter "artifact" with value "test_package" Got parameter "classifier" with value "" Got parameter "config" with value "config" Got parameter "destination" with value "" Got parameter "extension" with value "" Got parameter "extract" with value "1" Got parameter "fileItegRev" with value "" Got parameter "folderItegRev" with value "" Got parameter "latestVersion" with value "1" Got parameter "org" with value "" Got parameter "orgPath" with value "myorg" Got parameter "overwrite" with value "1" Got parameter "repoType" with value "NPM" Got parameter "repository" with value "npm-demo" Got parameter "repositoryPath" with value "" Got parameter "resultPropertySheet" with value "/myJob/retrievedArtifactVersions/" Got parameter "type" with value "" Got parameter "useRepositoryLayout" with value "1" Got parameter "version" with value "" Latest version for myorg:test_package is 1.0.0 Artifact path is myorg/test_package/test_package-1.0.0.tgz Artifact URL: http://10.200.1.102:8081/artifactory/npm-demo/myorg/test_package/test_package-1.0.0.tgz Downloading http://10.200.1.102:8081/artifactory/npm-demo/myorg/test_package/test_package-1.0.0.tgz into the job workspace Extracting test_package-1.0.0.tgz Extraction path: "test_package" Files extracted: - index.js - package.json Artifact properties: { "artifactory.licenses" : [ "ISC" ], "npm.version" : [ "1.0.0" ], "npm.name" : [ "test_package" ] } Set property "/myJob/retrievedArtifactVersions/test_package/npm.version" to value "1.0.0" Set property "/myJob/retrievedArtifactVersions/test_package/version" to value "1.0.0" Set property "/myJob/retrievedArtifactVersions/test_package/artifactory.licenses" to value "ISC" Set property "/myJob/retrievedArtifactVersions/test_package/fullFilename" to value "/opt/electriccloud/electriccommander/workspace/job_37171_20171121065017/test_package-1.0.0.tgz" Set property "/myJob/retrievedArtifactVersions/test_package/filename" to value "test_package-1.0.0.tgz" Set property "/myJob/retrievedArtifactVersions/test_package/url" to value "http://10.200.1.102:8081/artifactory/npm-demo/myorg/test_package/test_package-1.0.0.tgz" Set property "/myJob/retrievedArtifactVersions/test_package/npm.name" to value "test_package"
Generic example
Here is an example of a generic artifact in Artifactory:
Here is an example of the Artifactory plugin’s configuration:
Here is an example of the Retrieve Artifact from Artifactory procedure:
After the job is complete, the following summary appears:
Here are the job logs:
Got parameter "artifact" with value "module" Got parameter "classifier" with value "" Got parameter "config" with value "CustomLayout" Got parameter "destination" with value "" Got parameter "extension" with value "vsix" Got parameter "extract" with value "0" Got parameter "fileItegRev" with value "" Got parameter "folderItegRev" with value "" Got parameter "latestVersion" with value "1" Got parameter "org" with value "myorg" Got parameter "orgPath" with value "myorg" Got parameter "overwrite" with value "1" Got parameter "repoType" with value "Generic" Got parameter "repository" with value "custom-local" Got parameter "repositoryPath" with value "" Got parameter "resultPropertySheet" with value "/myJob/retrievedArtifactVersions" Got parameter "type" with value "" Got parameter "useRepositoryLayout" with value "1" Got parameter "version" with value "" Repository layout is "[org]/[module]/[baseRev].[ext]" Latest version for myorg:module is 10.0.1 Artifact path is myorg/module/10.0.1.vsix Artifact URL: http://10.200.1.102:8081/artifactory/custom-local/myorg/module/10.0.1.vsix Downloading http://10.200.1.102:8081/artifactory/custom-local/myorg/module/10.0.1.vsix into the job workspace Artifact has no properties Set property "/myJob/retrievedArtifactVersions/module/fullFilename" to value "/opt/electriccloud/electriccommander/workspace/job_39881_20171128060650/10.0.1.vsix" Set property "/myJob/retrievedArtifactVersions/module/filename" to value "10.0.1.vsix" Set property "/myJob/retrievedArtifactVersions/module/version" to value "10.0.1" Set property "/myJob/retrievedArtifactVersions/module/url" to value "http://10.200.1.102:8081/artifactory/custom-local/myorg/module/10.0.1.vsix"
PHP composer
Here is an example of a PHP composer artifact in Artifactory:
Here is an example of the Retrieve Artifact from Artifactory procedure:
After the job is complete, the following summary appears:
Here are the job logs:
Got parameter "artifact" with value "laravel-messenger" Got parameter "classifier" with value "" Got parameter "config" with value "config" Got parameter "destination" with value "" Got parameter "extension" with value "zip" Got parameter "extract" with value "0" Got parameter "fileItegRev" with value "" Got parameter "folderItegRev" with value "" Got parameter "latestVersion" with value "1" Got parameter "org" with value "" Got parameter "orgPath" with value "cmgmyr" Got parameter "overwrite" with value "0" Got parameter "repoType" with value "PHP" Got parameter "repository" with value "php-local" Got parameter "repositoryPath" with value "" Got parameter "resultPropertySheet" with value "/myJob/retrievedArtifactVersions" Got parameter "type" with value "" Got parameter "useRepositoryLayout" with value "1" Got parameter "version" with value "" Repository layout is "[orgPath]/[module]/[module]-[baseRev](-[fileItegRev]).[ext]" Latest version for cmgmyr:laravel-messenger is 1.0.0 Artifact path is cmgmyr/laravel-messenger/laravel-messenger-1.0.0.zip Artifact URL: http://10.200.1.102:8081/artifactory/php-local/cmgmyr/laravel-messenger/laravel-messenger-1.0.0.zip Downloading http://10.200.1.102:8081/artifactory/php-local/cmgmyr/laravel-messenger/laravel-messenger-1.0.0.zip into the job workspace Artifact properties: { "artifactory.licenses" : [ "MIT" ], "composer.keywords" : [ "laravel", "messenger", "messaging", "user messaging" ], "composer.name" : [ "cmgmyr/messenger" ], "composer.description" : [ "Simple user messaging tool for Laravel" ], "composer.author" : [ "Chris Gmyr" ], "composer.version" : [ "1.0.0" ], "composer.type" : [ "library" ] } Set property "/myJob/retrievedArtifactVersions/laravel-messenger/version" to value "1.0.0" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/composer.author" to value "Chris Gmyr" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/composer.description" to value "Simple user messaging tool for Laravel" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/composer.name" to value "cmgmyr/messenger" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/composer.type" to value "library" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/artifactory.licenses" to value "MIT" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/fullFilename" to value "/opt/electriccloud/electriccommander/workspace/job_39882_20171128063554/laravel-messenger-1.0.0.zip" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/composer.keywords" to value "laravel, messenger, messaging, user messaging" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/filename" to value "laravel-messenger-1.0.0.zip" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/url" to value "http://10.200.1.102:8081/artifactory/php-local/cmgmyr/laravel-messenger/laravel-messenger-1.0.0.zip" Set property "/myJob/retrievedArtifactVersions/laravel-messenger/composer.version" to value "1.0.0"
Release notes
EC-Artifactory 1.8.0
-
Upgraded from Perl 5.8 to Perl 5.32.
-
Starting from this release, a CloudBees CD/RO agent v10.3+ is required to run EC-Artifactory plugin procedures.
EC-Artifactory 1.7.1
-
Fixed an issue for the configuration form test connection.
-
Upgraded the Xerces library.
-
Fixed an issue where wrong field types were included in the component definition.
-
Fixed an issue for impossible to use component operations in a component process.
-
Fixed an issue for the Get Latest Artifact Version procedure that was missing a dropdown for the Repository key parameter.
EC-Artifactory 1.6.0
-
Changed the way Generic repositories are managed.
-
Upgraded the HttpClient library to v4.5.13.
-
Upgraded Apache Commons Codec library to v1.15.
-
Upgraded Jackson Databind library to v2.13.2.2.
EC-Artifactory 1.5.1
-
Fixed an issue when on some old configuration, EditConfiguration did not work properly.
EC-Artifactory 1.4.6
-
An HTTP client was changed for the UI dropdowns to address certain security issues.
EC-Artifactory 1.4.4
-
Updated the GetLatestVersion procedure to use maven-metadata.xml to resolve the latest version for Maven repositories.
EC-Artifactory 1.4.3
-
Removed an incorrect error message that sometimes appeared during configuration creation.
EC-Artifactory 1.4.2
-
Renamed to "CloudBees"
-
Fixed help link for the Retrieve Artifact from Artifactory procedure.
EC-Artifactory 1.4.0
The following new procedures have been introduced to support publishing 1 or more artifacts to Artifactory:
-
Publish Artifact to Artifactory
-
Publish Multiple Artifacts to Artifactory
EC-Artifactory 1.3.1
-
Added metadata that is required for the CloudBees CD/RO 9.0 release.
-
The plugin icon was updated.
EC-Artifactory 1.3.0
-
Plugin promotion time has been improved.
-
A new Get Latest Artifact Version procedure was introduced.
EC-Artifactory 1.2.1
-
Fixed the retrieval logic for snapshots in the Retrieve Artifact from Artifactory procedure to use both the extension and the build number, when comparing with Maven metadata.
EC-Artifactory 1.2.0
-
Added support for HTTP Proxy. Customers who use HTTP proxy can specify Proxy Information (Host, Port and Credentials at the configuration level) and all procedures use the Proxy as secondary credentials for authentication.
EC-Artifactory 1.1.2
-
Enabled the plugin for managing the plugin configurations in-line when defining an application process step or a pipeline stage task.
-
Hyphen in qualifier was fixed. For example, for a version like 1.2-H1-SNAPSHOT.
EC-Artifactory 1.1.1
-
Fixed an access control list (ACL) problem that occurred during plugin upgrade.