Create Artifact plugin procedures

3 minute readExtensibilityDeveloper productivity

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

Publishes a new artifact version.

Input parameters

Table 1. Publish input parameters
Parameter Description

Artifact name

Artifact name, in the form:

<groupId>:<artifactKey>

If the artifact does not exist, it is created if the user running this procedure or this project’s principal have the required permissions.

Version

Required. The full version string, in the form:

<major>.<minor>.<patch>-<qualifier>-<buildNumber>

This artifact version must be unique across all the artifact’s versions.

Repository name

Required. Name of the repository where the new artifact version should be published.

Enable compression?

Select to compress the artifact version before it is stored in the repository.

Follow symbolic links?

Select to follow symlinks when publishing the artifact version.

From directory

Name of the job workspace directory that contains the artifact version files. If not specified, the entire workspace is used.

Include pattern(s)

Semicolon-separated list of include patterns. If no patterns are specified, all files are included.

Exclude pattern(s)

Semicolon-separated list of include patterns. If no patterns are specified, no files are excluded.

Dependent artifact version(s)

Newline-separated list of 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 retrieved also.

Retrieve

Retrieves an artifact version. For more information on how artifact dependencies are retrieved, refer to Artifact retrieval dependency order.

Input parameters

Table 2. Retrieve input parameters
Parameter Description

Artifact name

Artifact name to retrieve, in the form:

<groupId>:<artifactKey>
If the artifact does not exist, it is created if the user launching this procedure or the project’s principal have the required permissions. Otherwise, if the artifact does not exist, this procedure fails.

Version

Select the type of version search to perform. Default is Latest, which retrieves the most recent published artifact.

Exact

Enter the exact artifact version to retrieve in the form:

<major>.<minor>.<patch>-<qualifier>-<buildNumber>

Minimum

Enter the minimum artifact version to retrieve, (as applicable) in the form:

<major>.<minor>.<patch>-<qualifier>-<buildNumber>

Minimum inclusive?

If selected, artifacts with this version are included.

Maximum

Enter the maximum artifact version to retrieve, (as applicable) in the form:

<major>.<minor>.<patch>-<qualifier>-<buildNumber>

Maximum inclusive?

If selected, artifacts with this version are included.

Retrieve to directory

Download artifact to a specific directory?

Retrieve to directory

Provide the path to store the artifact.

Overwrite?

Action to take if this artifact already exists in target directory.

Retrieved artifact location property

Required. 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.

Filter list

Newline-separated list of search filters for retrieving artifacts from CloudBees CD/RO. These filters must be in the form:

<propertyName>,<operator>,<operand-1-if-required>,<operand-2-if-required>

Where:

  • propertyName: The name of an artifact property.

  • operator: The method to measure the propertyName against the operand value. Possible values are:

    • equals

    • notEqual

    • greaterThan

    • greaterOrEqual

    • lessThan

    • lessOrEqual

    • like

    • contains

    • notLike

    • isNull (is not set)

    • isNotNull (is set)

    • between

  • operand: The value to check against the propertyName.

    For all operators, except isNotNull and isNull, at least one operand is required, such as <propertyName>,<operator>,<operand>. For between, both starting and ending operand`s are required, such as `version,between,<starting-operand>,<ending-operand>. For isNotNull and isNull, no operand is required, such as <propertyName>,isNull.

Example entry:

artifactVersionState,equals,available version,between,1.0.1,1.0.3 qaApproval,isNull
For a more detailed description of filtering, refer to Manage artifacts.

SyncArtifactVersion

Synchronize artifacts from a source artifact repository to one or more target repositories.

Input parameters

Table 3. SyncArtifactVersion input parameters
Parameter Description

Artifact name

Required. Artifact name, in the form:

<groupId>:<artifactKey>

Version

Required. The full version string, in the form:

<major>.<minor>.<patch>-<qualifier>-<buildNumber>

This artifact version must be unique across all the artifact’s versions.

Source repository

Required. Name of the repository from where this artifact version should be retrieved.

Target repository

Required. Semicolon-separated list of repositories, where this artifact should be uploaded.

Overwrite?

If selected, artifacts in the target repositories are overwritten.

Upload in parallel?

If selected, artifacts are uploaded to target repositories in parallel.