findArtifactVersions

Back to index

Summary

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.
  • Due to 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 the findArtifactVersions API to find the appropriate artifact version in the CloudBees CD/RO server, and then retrieves the artifact version from a repository. For findArtifactVersions, the step is only registered if run in a job step; for retrieveArtifactVersions, it is always registered.

artifactKey
Stringoptional
The artifactKey component of the GAV (GroupId/ArtifactVersionId/Version) coordinates.
artifactName
Stringoptional
The name of the artifact containing the artifactVersion.
artifactVersionName
Stringoptional
The name of the artifactVersion to find.
filters
Collectionoptional
A list of zero or more filter criteria definitions used to define objects to find.
groupId
Stringoptional
The groupId component of the GAV (GroupId/ArtifactVersionId/Version) coordinates. Defaults to the name of the project that owns the requesting job-step, if there is one. Otherwise, this is a required argument.
includeDependents
Booleanoptional
Whether to include dependent artifact versions in results.
jobStepId
UUIDoptional
If the retriever is a job-step, it gets registered as a consumer of the result artifactVersion.
versionRange
Stringoptional
Optional version range, specified in interval notation.

Usage

Perl

$cmdr->findArtifactVersions( # optionals );

ectool

ectool findArtifactVersions \ # optionals

Examples

Perl

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)"});

Example 2

# Find the most current core:infra artifact version with QA approval level 3 or above. $cmdr->findArtifactVersions({groupId => "core", artifactKey => "infra", filter => {propertyName => "qaLevel", operator => "greaterOrEqual", operand1 => "3"}});

ectool

This API is not supported by ectool.