ArtifactVersion

3 minute readReference

addDependentsToArtifactVersion

Adds a dependent 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 an artifact version.

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

Find the most current artifact version that matches the given filters, along with its dependent 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

Filters

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

Find an artifact version by name.

Arguments

Argument Name Type Description

artifactVersionName

String

The name of the artifactVersion. (Required)

includeRetrieverJobSteps

Boolean

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

includeRetrieverJobs

Boolean

Whether to include retriever job info 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

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

Remove 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 */)