addDependentsToArtifactVersion
Adds an artifact version query to an existing artifact. Dependent artifact versions are retrieved when the parent artifact version is retrieved.
You must specify an artifactVersionName
.
Arguments | Descriptions |
---|---|
|
The name of the artifact version. An artifact version name is interpreted by the server as the Argument type: String |
|
(Optional) One or more artifact version queries. The most current match of each query is retrieved when the primary artifact is retrieved. Dependent artifact version query strings are in this form: Argument type: Collection |
cleanupArtifactCache
Deletes stale artifact versions from an artifact cache. A "stale artifact version" is one whose metadata was previously deleted from the CloudBees CD/RO server.
If you are not logged in as "admin", you cannot use this command. However, using the force option overrides admin login privileges.
|
You must specify a cacheDirectory
.
Arguments | Descriptions |
---|---|
cacheDirectory |
The directory where stale artifact versions are stored. Argument type: String |
force |
< Boolean flag— Argument type: Boolean |
cleanupRepository
Deletes stale artifact versions from the repository backing-store. A "stale artifact version" is one whose metadata was previously deleted from the CloudBees CD/RO server.
If you are not logged in as "admin", you cannot use this command. However, using the force option overrides admin login privileges.
|
You must specify a backingStoreDirectory
.
Arguments | Descriptions |
---|---|
backingStoreDirectory |
The repository directory where artifact versions are stored. Argument type: String |
force |
< Boolean flag— If set to "true", this option can be used so you can cleanup the repository even if the g/a/v s in the directory specified do not match up with any artifacts reported by the server. By default, this is false, and helps users avoid deleting arbitrary directory trees if they did not specify the repository backing store properly. Argument type:Boolean |
createArtifact
Creates a new artifact.
You must specify groupId
and artifactKey
.
Arguments | Descriptions |
---|---|
groupId |
A user-generated group name for this artifact. This field is limited to alphanumeric characters, spaces, spaces, underscores, hyphens, and periods. Argument type: String |
artifactKey |
A user-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
artifactVersionNameTemplate |
(Optional) A template for the names of artifact versions published to this artifact. This option overrides the value set in the server settings for "artifact name template." The global setting can be manipulated in the Server Settings page (Go to Administration > Server, and select the Settings link). Argument type: String |
description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
Argument type: String |
createArtifactVersion
Creates a new artifact version.
You must specify version
.
Arguments | Descriptions |
---|---|
version |
The version component of the GAV ( Argument type: String |
artifactKey |
(Optional) A user-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
artifactName |
(Optional) The name of the artifact. Argument type: String |
dependentArtifactVersions |
(Optional) The set of artifact versions on which this Argument type: Collection |
description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
Argument type: String |
groupId |
(Optional) The Argument type: String |
jobStepId |
(Optional) The unique identifier for the job step that is used to make a project association. Argument type: UUID |
repositoryName |
(Optional) The name of the artifact repository. Argument type: String |
Response
Returns an artifactVersion
element.
createRepository
Creates a repository for one or more artifacts.
You must specify a repositoryName
.
Arguments | Descriptions |
---|---|
repositoryName |
The name of the artifact repository. Argument type: String |
description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
Argument type: String |
repositoryDisabled |
(Optional) < Boolean flag - Argument type: Boolean |
url |
The URL to use to communicate with the repository server. Argument type: String |
zoneName |
The name of the zone where this repository resides. Argument type: String |
deleteArtifact
deleteArtifactVersion
Deletes artifact version metadata from the CloudBees CD/RO database. (This API call does not delete or remove artifacts stored on the repository machine.)
You must specify an artifactVersionName
.
Arguments | Descriptions |
---|---|
artifactVersionName |
The name of the artifact version. An artifact version name is interpreted by the server as the Argument type: String |
deleteRepository
Deletes artifact repository metadata from the CloudBees CD/RO database. (This API call does not delete or remove artifacts stored on the repository machine.)
You must enter a repositoryName
.
Arguments | Descriptions |
---|---|
repositoryName |
The name of the artifact repository. Argument type: String |
findArtifactVersions
This command returns the most current artifact version that matches the filter criteria and its dependent artifact versions. This API implicitly searches for artifact versions in the "available" state, and if run in a job step, registers the step as a retriever for the returned artifact versions.
Because of the complexity of specifying filter criteria, this API is not supported by ectool . However, all of its capabilities are supported through the Perl API.
The retrieveArtifactVersions API uses this API to find the appropriate artifact version in the CloudBees CD/RO server and then retrieves the artifact version from a repository. You may prefer to use the retrieveArtifactVersions API instead of this API because while this API returns slightly different information, it also has the side-effect of "retriever step registration" mentioned above.
|
You must specify an artifactName
or a groupId
with an artifactKey
.
Arguments | Descriptions |
---|---|
artifactKey |
User-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. This is the Argument type: String |
artifactName |
The name of an artifact. Argument type: String |
artifactVersionName |
The name of an artifact version ( artifactVersion ). Argument type: String |
filters |
A list of zero or more filter criteria definitions used to define objects to find. Each element of the filter list is a hash reference containing one filter criterion. You may specify several filter criteria, in which case an object must meet all filter criteria to be included in the result. See the code example below for instructions on forming the list and passing it to the CloudBees CD/RO Perl API. Two types of filters:
Each property filter consists of a property name to test and an operator to use for comparison. The property can be either an intrinsic property defined by CloudBees CD/RO or a custom property added by the user. Each operator takes zero, one, or two operands to compare against the desired property. Property filter operators are:
A Boolean filter is a Boolean operator and an array of one or more filters that are operands. Each operand can be either a property filter or a Boolean filter. Boolean operators are:
Argument type: Collection |
groupId |
A user-generated group name for this artifact. This field may consist of alphanumeric characters, spaces, underscores, hyphens, and periods. This is the This argument is required when there is no job step. Argument type: String |
includeDependents |
< Boolean flag - Options are:
Argument type: Boolean |
jobStepId |
The unique identifier for the job step that is making the request. This job step is marked as a retriever for the matching artifact versions. Argument type: UUID |
versionRange |
The range of versions to search. Version range syntax is standard number interval notation. Argument type: String |
Response
Returns zero or more artifactVersion
elements. In addition, this API returns a searchDetails
element with text describing how the server evaluated candidate artifact versions and ultimately decided to return the result artifactVersion
and its dependents.
ec-perl
syntax: $cmdr->findArtifactVersions({<optionals>});
Example 1
# Find the most current core:infra artifact version whose version is 1.x.x. $cmdr->findArtifactVersions({groupId => "core", artifactKey => "infra", versionRange => "[1.0, 2.0)"}); # Or alternatively ... $cmdr->findArtifactVersions({artifactName => "core:infra", versionRange => "[1.0,2.0)"});
getArtifact
getArtifactVersion
Retrieves an artifact version by its name.
You must specify an artifactVersionName
.
Arguments | Descriptions |
---|---|
artifactVersionName |
The name of the artifact version to retrieve. An artifact version name is interpreted by the server as the Argument type: String |
includeRetrieverJobs |
(Optional) < Boolean flag— If set to Argument type: Boolean |
includeRetrieverJobSteps |
(Optional) < Boolean flag— If set to Argument type: Boolean |
maxRetrievers |
(Optional) If one of the Argument type: String |
Response
Returns one artifactVersion
element. If includeRetrieverJobs
or includeRetrieverJobSteps
is set, the artifactVersion
element will contain zero or more retriever child elements, each containing retriever information for one job or job step.
getArtifactVersions
Retrieves all artifact versions in the system, filtered by artifact name, retriever job ID, and/or retriever job step ID.
You must specify search filter criteria to find the artifact versions you need. If you do not provide any options, all artifact versions in the system are returned.
Arguments | Descriptions |
---|---|
artifactName |
The name of the artifact for the versions to retrieve. Argument type: String |
retrieverJobId |
The job ID to use when retrieving an artifact. Argument type: UUID |
retrieverJobStepId |
The job step ID to use when retrieving an artifact. Argument type: UUID |
getManifest
Retrieves the manifest for a specified artifact version. The manifest includes a list of files and directories in the artifact version and its checksum file.
You must specify the artifactVersionName
.
Arguments | Descriptions |
---|---|
artifactVersionName |
The name of the artifact version whose manifest you want to retrieve. Argument type: String |
Response
Returns manifest information for the specified artifact version: returns an XML stream containing any number of file elements, including the file name, file size, and "sha1" hashes for every file in the artifactVersionName
.
getRepositories
Retrieves all artifact repository objects known to the CloudBees CD/RO server.
Arguments | Descriptions |
---|---|
None |
– |
getRepository
getRetrievedArtifacts
Retrieves artifacts during a job.
You must specify an jobId
.
Arguments | Descriptions |
---|---|
jobId |
The unique CloudBees CD/RO -generated identifier (a UUID) for a job that is assigned automatically when the job is created. The system also accepts a job name assigned to the job by its name template. Argument type: UUID |
componentName |
(Optional) Name of the component. Argument type: String |
resourceName |
(Optional) Name of the resource. Argument type: String |
modifyArtifact
Modifies an existing artifact.
You must specify an artifactName
.
Arguments | Descriptions |
---|---|
artifactName |
The name of the artifact to modify. Argument type: String |
artifactVersionNameTemplate |
(Optional) A template for the names of artifact versions published to this artifact. This option overrides the value set in the server settings for "artifact name template." The global setting can be manipulated in the Server Settings page (Administration > Server, select the Settings link). Argument type: String |
description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
Argument type: String |
modifyArtifactVersion
Modifies an existing artifact version.
You must specify an artifactVersionName
.
Arguments | Descriptions | ||
---|---|---|---|
artifactVersionName |
The name of the artifact version to modify. An artifact version name is interpreted by the server as the Argument type: String |
||
artifactVersionState |
(Optional) The state of the artifact version. < Argument type: ArtifactVersionState |
||
dependentArtifactVersions |
(Optional) One or more artifact version queries. The most current match for each query is retrieved when the primary artifact is retrieved. Dependent artifact version query strings are in this form:
Argument type: Collection |
||
description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
Argument type: String |
||
newName |
(Optional) New name for this artifact version. Argument type: String |
||
removeAllDependentArtifactVersions |
(Optional) < Boolean flag— The default is Argument type: Boolean |
||
repositoryName |
(Optional) The name of the artifact repository. Argument type: String |
modifyRepository
Modifies an existing artifact repository.
You must specify a repositoryName
.
Arguments | Descriptions |
---|---|
repositoryName |
The name of the artifact repository. Argument type: String |
description |
(Optional) Plain text or HTML description for this object. If using HTML, you must surround your text with
Argument type: String |
newName |
(Optional) New name of the repository. Argument type: String |
repositoryDisabled |
(Optional) < Boolean flag— This argument marks the repository as enabled ( Argument type: Boolean |
url |
(Optional) The URL used to communicate with the artifact repository. Argument type: String |
zoneName |
(Optional) The name of the zone where this repository resides. Argument type: String |
moveRepository
Moves an artifact repository in front of another, specified repository or to the end of the list. This API does not move artifact version data to another repository server machine. Only the repository order in which CloudBees CD/RO searches to retrieve an artifact version is changed.
You must specify a repositoryName
.
Arguments | Descriptions |
---|---|
repositoryName |
The name of the artifact repository you need to move. Argument type: String |
beforeRepositoryName |
(Optional) Moves this repository ( Argument type: String |
publishArtifactVersion
Publishes an artifact version to an artifact repository.
This API wraps the "publish" function in the ElectricCommander::ArtifactManagement Perl module and hides some additional functionality implemented in that module.
|
You must specify an artifactName
or a groupId
with an artifactKey
.
Arguments | Descriptions |
---|---|
artifactName |
The name of an artifact. Argument type: String |
artifactKey |
User-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
compress |
<Boolean flag— Argument type: Boolean |
dependentArtifactVersions |
One or more artifact version queries. The most current match of each query is retrieved when the primary artifact is retrieved. Dependent artifact version query strings are in this form: Argument type: Collection |
description |
A plain text or HTML description for this object. If using HTML, you must surround your text with Argument type: String |
excludePatterns |
Semi-colon delimited list of file-path patterns indicating which files/directories under Argument type: Collection |
followSymlinks |
<Boolean flag— Default is "true". If true, follow symbolic links and record the target file contents with the symbolic link name in the artifact. If false, record the symbolic link as a symbolic link. Following symbolic links causes the publish API to remain compatible with previous releases. Argument type: Boolean |
fromDirectory |
The directory containing files to publish as the artifact version. A subset of files can be published based on Argument type: String |
groupId |
A user-generated group name for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
includePatterns |
Semicolon delimited list of file-path patterns indicating which files/directories under Argument type: Collection |
repositoryName |
The name of the artifact repository where you want to publish. Argument type: String |
version |
Unique identifier for the artifact version in the form: If a version argument is provided, but does not follow the above format, the version will be considered Argument type: String |
===Version number examples
User Input | Interpretation | ||
---|---|---|---|
Major.Minor.Patch |
Qualifier |
Build Number |
|
1 |
1.0.0 |
0 |
|
1.0 |
1.0.0 |
0 |
|
1.0-frank |
1.0.0 |
frank |
0 |
1.0-36 |
1.0.0 |
36 |
|
1.0-frank-36 |
1.0.0 |
frank |
36 |
===Pattern syntax
Include / exclude
patterns are expressed as relative paths under the fromDirectory
.
Pattern syntax and behavior is the same as Ant and uses the following wildcard specifiers:
` ?` —matches a single character
` \*` —matches any number of characters, but only at a single directory level
*\*
—matches any number of directory levels
Examples:
Use \*.txt
to match any .txt
file in the top-level directory.
Use */\*.txt
to match any .txt
file in any child directory.
Use *\*/\*.txt
to match any .txt
file at any level.
ec-perl
syntax: $cmdr->publishArtifactVersion({<optionals>});
Example
# Add version 1.0.0-55 for artifact myGroup:myKey with a dependency on cmdr:SDK:1.2.0, # and the most current version of core:infra that is greater than or equal to 2.1.0. # Note: In the Perl API, the argument must be specified as singular even though it # can take multiple values. $cmdr->publishArtifactVersion({artifactName => "myGroup:myKey", version => "1.0.0-55", dependentArtifactVersion => ["cmdr:SDK:1.2.0", "core:infra:{2.1,]"]});
removeDependentsFromArtifactVersion
Removes a list of dependent artifact versions from an existing artifact version.
You must specify the artifactVersionName
.
Arguments | Descriptions |
---|---|
artifactVersionName |
The name of the artifact version from which you want to remove dependents. An artifact version name is interpreted by the server as the Argument type: String |
dependentArtifactVersions |
(Optional) One or more artifact version queries. The most current match of each query is retrieved when the primary artifact is retrieved. Dependent artifact version query strings are in this form: The version range syntax is standard number interval notation. Argument type: Collection |
resolveRoute
Resolves the network route to an artifact repository.
You must specify the toRepositoryName
.
Arguments | Descriptions |
---|---|
toRepositoryName |
Name of the artifact repository. Argument type: String |
fromAgentId |
(Optional) Identifier of the agent requesting the route to a destination agent or artifact repository. Argument type: Long |
fromResourceName |
(Optional) Name of the resource requesting the route to a destination agent or artifact repository. Argument type: String |
retrieveArtifactVersions
Retrieves the most recent artifact version, including its dependents, from an artifact repository.
This API wraps the "retrieve" 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 retrieve.
Arguments | Descriptions |
---|---|
artifactKey |
User-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
artifactName |
The name of the artifact. Argument type: String |
artifactVersionName |
The name of the artifact version. Argument type: String |
cacheDirectory |
The directory where the artifact version is stored. The artifact version files are stored in a subdirectory under this cache directory. Argument type: String |
filters |
A list of zero or more filter criteria definitions used to define objects to find. Each element of the filter list is a hash reference containing one filter criterion. You may specify several filter criteria, in which case an object must meet all filter criteria to be included in the result. See the code example below for instructions on forming the list and passing it to the CloudBees CD/RO Perl API. There are two types of filters:
Each property filter consists of a property name to test and an operator to use for comparison. The property can be either an intrinsic property defined by CloudBees CD/RO or a custom property added by the user. Each operator takes zero, one, or two operands to compare against the desired property. Property filter operators are:
A Boolean filter is a Boolean operator and an array of one or more filters that are operands. Each operand can be either a property filter or a Boolean filter. Boolean operators are:
Argument type: Collection |
groupId |
A user-generated group name for this artifact. This field may consist of alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
includeDependents |
<Boolean flag— The default is
If the value is Argument type: Boolean |
overwrite |
Options are:
Argument type: String |
repositoryNames |
A space-separated list of artifact repository names. Retrieval is attempted from each specified repository in a specified order until it succeeds or all specified repositories have rejected the retrieval. If not specified, and if this request is made in a job step context, a preferred list of repository names is obtained from the Resource definition in the server. If that list is empty, the global repository list is used. Argument type: String |
retryNumber |
Number of retry attempts for the operation. The default is 1. The time between retry attempts is 20 seconds. Argument type: Integer |
toDirectory |
Used to retrieve an artifact version to a specific directory without imposing the structure of a cache directory. Specify the full path to the new directory.
Argument type: String |
versionRange |
The range of versions to search. Version range syntax is standard number interval notation. Argument type: String |
ec-perl
syntax: $cmdr->retrieveArtifactVersions {<optionals>});
Examples
# Retrieve the most current core:infra artifact version whose version is 1.x.x. $cmdr->retrieveArtifactVersions({groupId => "core", artifactKey => "infra", versionRange => "[1.0,2.0)"}); # Or alternatively... $cmdr->retrieveArtifactVersions({artifactName => "core:infra", versionRange => "[1.0,2.0)"});
ectool
syntax: ectool retrieveArtifactVersions [optionals]
updateArtifactVersion
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.
Arguments | Descriptions |
---|---|
artifactKey |
User-specified identifier for this artifact. This field is limited to alphanumeric characters, spaces, underscores, hyphens, and periods. Argument type: String |
artifactName |
The name of the artifact. Argument type: String |
description |
A plain text or HTML description for this object. If using HTML, you must surround your text with Argument type: String |
excludePatterns |
Semi-colon delimited list of file-path patterns indicating which files/directories under Argument type: Collection |
followSymlinks |
<Boolean flag— The default is Argument type: Boolean |
fromDirectory |
The directory containing files to publish as the artifact version. A subset of files can be published based on Argument type: String |
groupId |
A user-generated group name for this artifact. This field is limited to alphanumeric characters, spaces, spaces, underscores, hyphens, and periods. Argument type: String |
includePatterns |
Semi-colon delimited list of file-path patterns indicating which files/directories under Argument type: Collection |
newVersion |
Unique identifier for the new artifact version in the form: Argument type: String |
path |
The path of the original artifact under which one or more files will be added or replaced. The default path is the root. Argument type: String |
version |
Unique identifier for the artifact version in the form: Argument type: String |