The FileSysRepo plugin supports retrieval of versioned file artifacts stored on a file system. Starting with version 1.0.0, the plugin supports a flexible artifact file structure based on each customer’s unique storage schemes. Use the FileSysRepo plugin to:
-
Add procedures to retrieve artifacts for storage in CloudBees CD/RO file systems.
-
Store artifacts in directories other than the workspace directory in one or more CloudBees CD/RO agents.
Use this procedure to retrieve an artifact from the file system by specifying its:
-
Root directory
-
Relative artifact path
-
Artifact name and version
-
Destination directory
-
Overwrite actions if it already exists
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 2.0.0.2023083041 Revised on November 27, 2023
Create FileSysRepo 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 Differences in plugin UI behavior. field may behave differently in the CloudBees CD/RO UI. For more information, refer to |
Retrieve file artifact
Retrieves an artifact from the file system.
Parameter | Description |
---|---|
Root directory |
Required. Source directory of the artifact. |
Relative artifact path |
Path to artifact files relative to the root directory. Placeholders |
Artifact |
Required. Name of the artifact to retrieve. |
Version |
Required. Version of the artifact to retrieve.
|
Retrieve to Directory |
Destination directory. If you do not enter a directory, the default is the workspace directory. |
Artifact path refers to a file? |
If selected, the artifact path refers to a file. If not selected (default), the artifact path is assumed to refer to a directory. |
Overwrite? |
If selected, artifact files overwrite any existing files in the target location. Any files in the target location that do not exist in the source location remain as-is. If not selected (default), artifact files are copied to the target location only if the target location is empty, otherwise the procedure fails with an error. |
Examples
The following examples demostrate artifact version storage schemas supported by the FileSysRepo plugin.
In the following example, the artifact storage schema where the artifact name is Jupiter
and the artifact version is part of a subdirectory name:
The relevant parameter values in this case may be set as follows:
Parameter | Value |
---|---|
Root Directory |
|
Relative Artifact Path |
|
Version |
Latest (as the selected option) |
In the following example, there is a fixed file artifact storage schema supported prior to version 1.0.0
:
The relevant parameter values in this case may be set as follows:
Parameter | Value |
---|---|
Root Directory |
|
Relative Artifact Path |
Leave this field empty (the default |
Version |
Latest (as the selected option) |
FileSysRepo plugin release notes
2.0.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 plugin procedures.
1.0.0
-
Added support for a flexible artifact file structure.
-
Added strategies for retrieving the latest artifact version that can be configured by the user based on their artifact versioning scheme on the file system.
-
Added the Overwrite option to control whether any existing files should be overwritten in the target location. By default, the Retrieve File Artifact procedure does not overwrite any existing files and fails with an error unless the Overwrite option is selected.
Previously, any overlapping files were overwritten without prompting, and you were required to update scripts and procedures to set the override parameter to
true
or1
to allow the Retrieve File Artifact procedure to overwrite an existing files in the target location.