ArtifactVersion

3 minute readReference

addDependentsToArtifactVersion

Adds an artifact version query to an existing artifact. Dependent artifact versions are retrieved when the parent artifact version is retrieved.

Arguments

Argument Name Type Description

artifactVersionName

String

The name of the artifactVersion. (Required)

dependentArtifactVersions

String array

List of dependent artifactVersions to add/remove from the artifactVersion.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.addDependentsToArtifactVersion( artifactVersionName: 'test-artifactVersionName' /* optional arguments */)

createArtifactVersion

Creates a new artifact version.

When invoked in the context of a job step, COMMANDER_JOBSTEPID will be automatically set as the jobStepId argument value unless jobStepId is already specified.

Arguments

Argument Name Type Description

artifactKey

String

The artifactKey component of the GAV (GroupId/ArtifactVersionId/Version) coordinates.

artifactName

String

The name of the artifact containing the artifactVersion.

dependentArtifactVersions

String array

The set of artifactVersions on which this artifactVersion depends.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

groupId

String

The groupId component of the GAV (GroupId/ArtifactVersionId/Version) coordinates.

jobStepId

String

The ID of the job step; used to make a project association.

repositoryName

String

The name of the artifact repository.

version

String

The version component of the GAV (GroupId/ArtifactVersionId/Version) coordinates.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createArtifactVersion( /* optional arguments */)

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

Arguments

Argument Name Type Description

artifactVersionName

String

The name of the artifactVersion. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteArtifactVersion( artifactVersionName: 'test-artifactVersionName')

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.

When invoked in the context of a job step, COMMANDER_JOBSTEPID will be automatically set as the jobStepId argument value unless jobStepId is already specified.

Arguments

Argument Name Type Description

artifactKey

String

The artifactKey component of the GAV (GroupId/ArtifactVersionId/Version) coordinates.

artifactName

String

The name of the artifact containing the artifactVersion.

artifactVersionName

String

The name of the artifactVersion to find.

filters

Filter array

A list of zero or more filter criteria definitions used to define objects to find.

groupId

String

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

Boolean

Whether to include dependent artifact versions in results.

jobStepId

String

If the retriever is a job-step, it gets registered as a consumer of the result artifactVersion.

versionRange

String

Optional version range, specified in interval notation.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.findArtifactVersions( /* optional arguments */)

getArtifactVersion

Retrieves an artifact version by its name.

Arguments

Argument Name Type Description

artifactVersionName

String

The name of the artifactVersion. (Required)

includeRetrieverJobSteps

Boolean

Whether to include retriever job-step information in the response.

includeRetrieverJobs

Boolean

Whether to include retriever job information in the response.

maxRetrievers

Integer

The maximum number of retriever jobs or jobsteps to return.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getArtifactVersion( artifactVersionName: 'test-artifactVersionName' /* optional arguments */)

getArtifactVersions

Retrieve all artifact versions in the system, possibly filtered by artifact, retriever job, or retriever job-step.

Arguments

Argument Name Type Description

artifactName

String

The name of the artifact to use.

retrieverJobId

String

The ID or name of the job to use.

retrieverJobStepId

String

The ID of the job step to use.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getArtifactVersions( /* optional arguments */)

modifyArtifactVersion

Modifies an existing artifact version.

Arguments

Argument Name Type Description

artifactVersionName

String

The name of the artifact version.

artifactVersionState

String

The state of the artifact version.

dependentArtifactVersions

String array

The set of artifactVersions on which this artifactVersion depends.

description

String

Comment text describing this object that is not interpreted at all by CloudBees CD/RO.

newName

String

The new name for an existing object that is being renamed.

removeAllDependentArtifactVersions

Boolean

If true then all dependencies will be removed.

repositoryName

String

The name of the artifact repository.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyArtifactVersion( /* optional arguments */)

removeDependentsFromArtifactVersion

Removes a list of dependent artifact versions from an existing artifact version.

Arguments

Argument Name Type Description

artifactVersionName

String

The name of the artifactVersion. (Required)

dependentArtifactVersions

String array

List of dependent artifactVersions to add/remove from the artifactVersion.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.removeDependentsFromArtifactVersion( artifactVersionName: 'test-artifactVersionName' /* optional arguments */)