Artifact plugin

4 minute readExtensibilityDeveloper productivity

The CloudBees CD/RO Artifact plugin provides an interface to the CloudBees CD/RO artifact repository for artifact version publish and retrieve operations. For more information about the artifact repository, refer to Manage artifacts.

Prerequisites

This plugin uses an updated version of Perl, cb-perl shell (Perl v5.32), and requires CloudBees CD/RO agents version 10.3+ to work.

Plugin Version 1.2.1.2024022211. Revised on February 23, 2024.

Create Artifact plugin configurations

Plugin configurations are sets of parameters that can be applied across some, or all, plugin procedures. They can reduce the repetition of common values, create predefined parameter sets, and securely store credentials. Each configuration is given a unique name that is entered in the designated parameter for the plugin procedures that use them. The following steps illustrate how to create a plugin configuration that can be used by one or more plugin procedures.

To create a plugin configuration:

  1. Navigate to DevOps Essentials  Plugin Management  Plugin configurations.

  2. Select Add plugin configuration to create a new configuration.

  3. In the New Configuration window, specify a Name for the configuration.

  4. Select the Project that the configuration belongs to.

  5. Optionally, add a Description for the configuration.

  6. Select the appropriate Plugin for the configuration.

  7. Configure the plugin configuration parameters.

  8. Select OK.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Create Artifact plugin procedures

Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.

Depending on your plugin configuration and how you run procedures, the Input parameters  Configuration name field may behave differently in the CloudBees CD/RO UI. For more information, refer to Differences in plugin UI behavior.

Publish

Creates a step to publish a new artifact version.

Input parameters

Parameter Description

Artifact

Required. Artifact name, in the form: <groupId>:<artifactKey>. If the artifact does not exist, it is created if this procedure’s launching user or this project’s principal has the required permissions.

Version

Artifact version, in the form: <major>.<minor>.<patch>-<qualifier>-<buildNumber>. The version specification must be unique across all of this artifact’s versions.

Repository

Required. Name of the repository where the new artifact version is published.

Enable Compression?

If selected, the artifact version is compressed before it is stored in the repository.

Follow Symbolic Links?

Name of the cluster in which server is to be added.

From directory

Name of the directory in the job’s workspace that contains files that comprise the artifact version to be published. If not specified, the entire workspace is used.

Add Include Pattern

File patterns to include, to limit the files that are published. If no patterns are specified, all files are included.

Add Exclude Pattern

File patterns to exclude, to limit the files that are published. If no patterns are specified, no files are excluded.

Add Dependent Artifact Version

Dependent artifact versions, in the form: <groupId>:<artifactKey>:<versionRange>. All dependent artifact versions must exist for this artifact version to be retrievable. When this artifact version is successfully retrieved, its dependent artifact versions are also retrieved.

Retrieve

Retrieves an artifact version.

Parameter Description

Artifact

Required. Artifact name, in the form: <groupId>:<artifactKey>. If the artifact does not exist, it is created if this procedure’s launching user or this project’s principal has the required permissions.

Version

Artifact version, in the form: <major>.<minor>.<patch>-<qualifier>-<buildNumber>. The options are: Latest, an Exact version, or a version Range of the artifact. The version specification must be unique across all of this artifact’s versions.

Retrieve to directory

Download the artifact version to a specific directory.

Retrieved Artifact Location Property

Name or property sheet path used by the step to create a property sheet. This property sheet stores information about the retrieved artifact version(s), including their location in the file system.

From directory

Name of the directory in the job’s workspace that contains files that comprise the artifact version to be published. If not specified, the entire workspace is used.

Add Filter

Search filter to apply when querying the CloudBees CD/RO database for the artifact version to retrieve.

Artifact retrieval dependency order explained

The order of dependencies registered for an artifact version are significant. Consider this scenario:

  • A depends on B (any version) and C [1.0, 2.0]

  • B depends on C (any version)

  • C versions 1.0, 2.0, and 3.0 exist

In the version range, syntax [] indicates inclusive and () indicates exclusive.

When retrieving A, the dependency algorithm evaluates B first. The algorithm finds that the maximum version of B depends on any version of C, so the algorithm looks for max version C and finds C 3.0. Because this chain is satisfied, the algorithm returns to A and evaluates its next dependency "C [1.0, 2.0]". This results in matching C 1.0. The returned artifacts are: A, B, C 1.0, and C 3.0.

Consider if the A dependency is changed to:

  • A depends on C [1.0, 2.0] and B (any version)

  • B depends on C (any version)

  • C versions 1.0, 2.0, and 3.0 exist

The algorithm will choose C 1.0 first. Then the algorithm evaluates B, determines that its "C (any version)" is satisfiable by the already chosen C 1.0. The returned artifacts are A, B, and C 1.0.

SyncArtifactVersion

Input parameters

Parameter Description

Artifact

Required. Artifact name, in the form: <groupId>:<artifactKey>. If the artifact does not exist, it is created if this procedure’s launching user or this project’s principal has the required permissions.

Version

Required. Artifact version, in the form: <major>.<minor>.<patch>-<qualifier>-<buildNumber>. The options are: Latest, an Exact version, or a version Range of the artifact. The version specification must be unique across all of this artifact’s versions.

Source Repository

Required. Name of the repository, where the artifact is retrieved.

Target Repository

Required. Name of the repository, where the artifact is uploaded.

Add target repository

Name of additional repositories, where the artifact is uploaded.

Overwrite?

If selected, artifacts on target repositories are overwritten.

Upload in parallel?

If selected, artifacts are uploaded to the target repository in parallel.

Release notes

EC-Artifact 1.2.1

  • Improved SSL/TLS certificate validation to ensure that when the Ignore SSL issues parameter is selected that SSL/TLS validation is properly disabled.

EC-Artifact 1.2.0

  • Upgraded from Perl 5.8 to Perl 5.32. The plugin is not backward compatible with CloudBees CD/RO versions prior to 10.3. Starting from this release, a new agent is required to run EC-Artifact plugin procedures.

EC-Artifact 1.1.10

  • Fixed an open redirect vulnerability for XSS cookie stealing.

EC-Artifact 1.1.9

  • Converted the documentation to AsciiDoc format.

EC-Artifact 1.1.8

  • Renaming to "CloudBees CD"

EC-Artifact 1.1.7

  • Renamed to "CloudBees".

EC-Artifact 1.1.6

  • Fixed dropdowns in Google Chrome.

EC-Artifact 1.1.5

  • Added metadata required for the 9.0 release.

EC-Artifact 1.1.4

  • Added support for AIX agents.

EC-Artifact 1.1.3

  • Added support for the SyncArtifactVersion procedure.