Groovy API reference

Repository

2 minute readReference

createRepository

Creates a repository for one or more artifacts.

Arguments

Argument Name Type Description

repositoryName

String

The repository name. (Required)

description

String

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

repositoryDisabled

Boolean

Whether or not to disable the repository.

url

String

The URL for contacting the repository.

zoneName

String

The zone name.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.createRepository(
                repositoryName: 'test-repositoryName'
                /* optional arguments */)

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

Arguments

Argument Name Type Description

repositoryName

String

The repository name. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteRepository(
                repositoryName: 'test-repositoryName')

getRepositories

Retrieves all artifact repository objects known to the CloudBees CD/RO server.

Arguments

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getRepositories()

getRepository

Retrieves an artifact repository by its name.

Arguments

Argument Name Type Description

repositoryName

String

The repository name. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.getRepository(
                repositoryName: 'test-repositoryName')

modifyRepository

Modifies an existing artifact repository.

Arguments

Argument Name Type Description

repositoryName

String

The repository name. (Required)

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.

repositoryDisabled

Boolean

Whether or not to disable the repository.

url

String

The URL for contacting the repository.

zoneName

String

The zone name.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.modifyRepository(
                repositoryName: 'test-repositoryName'
                /* optional arguments */)

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.

Arguments

Argument Name Type Description

repositoryName

String

The repository name. (Required)

beforeRepositoryName

String

Used when reordering the artifact repositories: the repository is moved to a position just before this repository. Blank means move the repository to the end of the artifact repository list.

Usage

import com.electriccloud.client.groovy.ElectricFlow
import com.electriccloud.client.groovy.models.*


ElectricFlow ef = new ElectricFlow()

def result = ef.moveRepository(
                repositoryName: 'test-repositoryName'
                /* optional arguments */)