updateArtifactVersion

Back to index

Summary

Updates an artifact version by adding or replacing one or more files in the existing file and publishes the result as a new artifact version to an artifact repository. This API wraps the update function in the ElectricCommander::ArtifactManagement Perl module and hides some additional functionality implemented in that module.

You must specify search criteria options to locate the artifact versions you want to update.

artifactKey
Stringoptional
User-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods.
artifactName
Stringoptional
The name of the artifact.
description
Stringoptional
A plain text or HTML description for this object. If using HTML, you must surround your text with <html> … </html> tags. The only HTML tags allowed in the text are: <a> <b> <br> <div> <dl> <font> <i> <li> <ol> <p> <pre> <span> <style> <table> <tc> <td> <th> <tr> <ul>.
excludePatterns
Arrayoptional
Semicolon delimited list of file-path patterns indicating which files/directories under "fromDirectory" to exclude when publishing an artifact version. Defaults to "empty," which means no files are excluded.
followSymlinks
Booleanoptional
The default is 1 or true. If 1 or true, CloudBees CD/RO follows symbolic links and record the target file contents with the symbolic link name in the artifact. If 0 or false, CloudBees CD/RO records the symbolic link as a symbolic link. Following symbolic links causes the publishing API to remain compatible with previous releases.
fromDirectory
Stringoptional
The directory containing files to publish as the artifact version. A subset of files can be published based on includePatterns and excludePatterns.
groupId
Stringoptional
A user-generated group name for this artifact. This field is limited to alphanumeric characters, spaces, spaces, underscores, hyphens, and periods.
includePatterns
Arrayoptional
Semicolon delimited list of file-path patterns indicating which files/directories under "fromDirectory" to publish in the artifact version. Defaults to "empty," which means all files will be included. Conversely, if only two files are "included," no other files except those two will be included.
newVersion
Stringoptional
Unique identifier for the new artifact version in the form: major.minor.patch-qualifier-buildNumber. major, minor, patch, and buildNumber are integers and qualifier can contain any character except the following: \\:<>|?*/ If a version argument is provided, but does not follow the above format, the version will be considered 0.0.0-<user-specified-version-arg>-0 implicitly.
path
Stringoptional
The path of the original artifact under which one or more files will be added or replaced. The default path is the root.
version
Stringoptional
Unique identifier for the artifact version in the form: major.minor.patch-qualifier-buildNumber. major, minor, patch, and buildNumber are integers and qualifier can contain any character except the following: \:<>|?*/. If a version argument is provided, but does not follow the above format, the version will be considered 0.0.0-<user-specified-version-arg>-0 implicitly.

Usage

Perl

$cmdr->updateArtifactVersion( # optionals );

ectool

ectool updateArtifactVersion \ # optionals

Examples

Perl

# Update the current myGroup:myKey artifact version to version 1.0.0-55. $cmdr->updateArtifactVersion({artifactName => "myGroup:myKey", newVersion => "1.0.0-55"});

ectool

ectool updateArtifactVersion --artifactName "myGroup:myKey" --newVersion "1.0.0-55"