Server commands

createApplicationFromDeploymentPackage

Run procedure that creates application from deployment package.

Arguments

Argument Name Type Description

artifactFileName

String

The artifact file name (Required)

artifactGroup

String

The artifact group (Required)

artifactKey

String

The artifact key (Required)

artifactVersion

String

The artifact version (Required)

dslString

String

The DSL to pass to invoking procedure

retrieveToFolder

String

Folder where the artifact is retrieved, '.' by default

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.createApplicationFromDeploymentPackage(
                artifactFileName: 'test-artifactFileName',
                artifactGroup: 'test-artifactGroup',
                artifactKey: 'test-artifactKey',
                artifactVersion: 'test-artifactVersion'
                /* optional arguments */)

evalDsl

Evaluates a CloudBees Flow DSL script.

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

dsl

String

The DSL text. (Required)

applicationName

String

The name of the application container of the property sheet which owns the property.

applicationTierName

String

The name of the application tier container of the property sheet which owns the property.

archiveConnectorName

String

The name of the archive connector of the property sheet which owns the property.

artifactName

String

The name of the artifact container of the property sheet which owns the property.

artifactVersionName

String

The name of the artifactVersion container of the property sheet which owns the property.

catalogName

String

The name of the catalog of the property sheet which owns the property.

ciBuildDetailName

String

The name of the CI build detail of the property sheet which owns the property.

clusterName

String

The name of the cluster which owns property sheet.

componentName

String

The name of the component container of the property sheet which owns the property.

configName

String

The name of the emailConfig container that owns the property.

containerName

String

The name of the container that owns the property.

credentialName

String

The name of the credential container of the property sheet which owns the property.

dashboardName

String

The name of the dashboard of the property sheet which owns the property.

dataRetentionPolicyName

String

The name of the data retention policy of the property sheet which owns the property.

debug

Boolean

True to include debug output

describe

Boolean

True to return help description for the DSL text.

environmentName

String

The name of the environment container of the property sheet which owns the property.

environmentTemplateName

String

The name of the environment template container of the property sheet which owns the property.

environmentTemplateTierName

String

The name of the environment template tier container of the property sheet which owns the property.

environmentTierName

String

The name of the environment tier container of the property sheet which owns the property.

flowName

String

The name of the flow container of the property sheet which owns the property.

flowRuntimeId

String

The primary key or name of the flowRuntime container of the property sheet which owns the property.

flowRuntimeName

String

The name of the flow runtime container of the property sheet which owns the property.

flowRuntimeStateId

String

The primary key or name of the flowRuntimeState container of the property sheet which owns the property.

flowRuntimeStateName

String

The name of the flow state container of the property sheet which owns the property.

flowStateName

String

The name of the flow state container of the property sheet which owns the property.

flowTransitionName

String

The name of the flow transition container of the property sheet which owns the property.

gateType

String

The type of the gate which owns property sheet.

gatewayName

String

The name of the gateway container of the property sheet.

groupName

String

The name of the group container of the property sheet which owns the property.

helpFormat

String

Format to use for the DSL help content

jobId

String

The primary key or name of the job container of the property sheet which owns the property.

jobStepId

String

The primary key of the job-step container of the property sheet which owns the property.

notifierName

String

The name of the notifier container of the property sheet which owns the property.

objectId

String

The object id as returned by FindObjects.

overwrite

Boolean

True to use 'overwrite' mode. If the object exists, all existing attributes of the object will be overwritten by the values in the DSL.

parameters

String

JSON text which is parsed and passed to the DSL as a map.

path

String

Property path string.

pipelineName

String

The name of the pipeline container of the property sheet which owns the property.

pluginName

String

The name of the plugin container of the property sheet which owns the property.

procedureName

String

The name of the procedure container of the property sheet which owns the property.

processName

String

The name of the process, if the container is a process or process step.

processStepName

String

The name of the process step, if the container is a process step.

projectName

String

The name of the project container of the property sheet which owns the property.

propertySheetId

String

The primary key of the property sheet which owns the property.

releaseName

String

The name of the release container of the property sheet which owns the property.

reportName

String

The name of the report of the property sheet which owns the property.

reportObjectTypeName

String

The name of the report object type of the property sheet which owns the property.

repositoryName

String

The name of the repository container of the property sheet which owns the property.

resourceName

String

The name of the resource container of the property sheet which owns the property.

resourcePoolName

String

The name of the resource pool container of the property sheet which owns the property.

resourceTemplateName

String

The name of the resource template container of the property sheet which owns the property.

scheduleName

String

The name of the schedule container of the property sheet.

searchFilterName

String

The name of the search filter container of the property sheet.

serverLibraryPath

String

Path to the server directory that contains jar files and classes to be added to the classpath when evaluating the DSL text.

serviceAccountName

String

Get the name of the service account container of the property sheet

serviceName

String

The name of the service container of the property sheet.

sessionPassword

String

Session user’s password. Used to re-verify identity before changing user passwords in the system.

snapshotName

String

The name of the snapshot container of the property sheet which owns the property.

stageName

String

The name of the stage container of the property sheet which owns the property.

stateDefinitionName

String

The name of the state definition container of the property sheet which owns the property.

stateName

String

The name of the state container of the property sheet which owns the property.

stepName

String

The name of the step container of the property sheet which owns the property.

systemObjectName

String

The system object.

taskName

String

The name of the task which owns property sheet.

timeout

Integer

Maximum duration of execution for the given DSL, in seconds. Defaults to 'maxDslDuration' server setting.

transitionDefinitionName

String

The name of the transition definition container of the property sheet which owns the property.

transitionName

String

The name of the transition container of the property sheet which owns the property.

userName

String

The name of the user container of the property sheet which owns the property.

widgetName

String

The name of the widget of the property sheet which owns the property.

workflowDefinitionName

String

The name of the workflow definition container of the property sheet which owns the property.

workflowName

String

The name of the workflow container of the property sheet which owns the property.

workspaceName

String

The name of the workspace container of the property sheet.

zoneName

String

The name of the zone container of the property sheet.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.evalDsl(
                dsl: 'test-dsl'
                /* optional arguments */)

evalScript

Evaluate a script in the given context.

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

value

String

The string to expand in the specified context. (Required)

applicationName

String

The name of the application container of the property sheet which owns the property.

applicationTierName

String

The name of the application tier container of the property sheet which owns the property.

archiveConnectorName

String

The name of the archive connector of the property sheet which owns the property.

artifactName

String

The name of the artifact container of the property sheet which owns the property.

artifactVersionName

String

The name of the artifactVersion container of the property sheet which owns the property.

catalogName

String

The name of the catalog of the property sheet which owns the property.

ciBuildDetailName

String

The name of the CI build detail of the property sheet which owns the property.

clusterName

String

The name of the cluster which owns property sheet.

componentName

String

The name of the component container of the property sheet which owns the property.

configName

String

The name of the emailConfig container that owns the property.

containerName

String

The name of the container that owns the property.

credentialName

String

The name of the credential container of the property sheet which owns the property.

dashboardName

String

The name of the dashboard of the property sheet which owns the property.

dataRetentionPolicyName

String

The name of the data retention policy of the property sheet which owns the property.

environmentName

String

The name of the environment container of the property sheet which owns the property.

environmentTemplateName

String

The name of the environment template container of the property sheet which owns the property.

environmentTemplateTierName

String

The name of the environment template tier container of the property sheet which owns the property.

environmentTierName

String

The name of the environment tier container of the property sheet which owns the property.

flowName

String

The name of the flow container of the property sheet which owns the property.

flowRuntimeId

String

The primary key or name of the flowRuntime container of the property sheet which owns the property.

flowRuntimeName

String

The name of the flow runtime container of the property sheet which owns the property.

flowRuntimeStateId

String

The primary key or name of the flowRuntimeState container of the property sheet which owns the property.

flowRuntimeStateName

String

The name of the flow state container of the property sheet which owns the property.

flowStateName

String

The name of the flow state container of the property sheet which owns the property.

flowTransitionName

String

The name of the flow transition container of the property sheet which owns the property.

gateType

String

The type of the gate which owns property sheet.

gatewayName

String

The name of the gateway container of the property sheet.

groupName

String

The name of the group container of the property sheet which owns the property.

jobId

String

The primary key or name of the job container of the property sheet which owns the property.

jobStepId

String

The primary key of the job-step container of the property sheet which owns the property.

notifierName

String

The name of the notifier container of the property sheet which owns the property.

objectId

String

The object id as returned by FindObjects.

path

String

Property path string.

pipelineName

String

The name of the pipeline container of the property sheet which owns the property.

pluginName

String

The name of the plugin container of the property sheet which owns the property.

procedureName

String

The name of the procedure container of the property sheet which owns the property.

processName

String

The name of the process, if the container is a process or process step.

processStepName

String

The name of the process step, if the container is a process step.

projectName

String

The name of the project container of the property sheet which owns the property.

propertySheetId

String

The primary key of the property sheet which owns the property.

releaseName

String

The name of the release container of the property sheet which owns the property.

reportName

String

The name of the report of the property sheet which owns the property.

reportObjectTypeName

String

The name of the report object type of the property sheet which owns the property.

repositoryName

String

The name of the repository container of the property sheet which owns the property.

resourceName

String

The name of the resource container of the property sheet which owns the property.

resourcePoolName

String

The name of the resource pool container of the property sheet which owns the property.

resourceTemplateName

String

The name of the resource template container of the property sheet which owns the property.

scheduleName

String

The name of the schedule container of the property sheet.

searchFilterName

String

The name of the search filter container of the property sheet.

serviceAccountName

String

Get the name of the service account container of the property sheet

serviceName

String

The name of the service container of the property sheet.

snapshotName

String

The name of the snapshot container of the property sheet which owns the property.

stageName

String

The name of the stage container of the property sheet which owns the property.

stateDefinitionName

String

The name of the state definition container of the property sheet which owns the property.

stateName

String

The name of the state container of the property sheet which owns the property.

stepName

String

The name of the step container of the property sheet which owns the property.

systemObjectName

String

The system object.

taskName

String

The name of the task which owns property sheet.

transitionDefinitionName

String

The name of the transition definition container of the property sheet which owns the property.

transitionName

String

The name of the transition container of the property sheet which owns the property.

userName

String

The name of the user container of the property sheet which owns the property.

widgetName

String

The name of the widget of the property sheet which owns the property.

workflowDefinitionName

String

The name of the workflow definition container of the property sheet which owns the property.

workflowName

String

The name of the workflow container of the property sheet which owns the property.

workspaceName

String

The name of the workspace container of the property sheet.

zoneName

String

The name of the zone container of the property sheet.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.evalScript(
                value: 'test-value'
                /* optional arguments */)

expandString

Expand property references in a string in the given context.

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

value

String

The string to expand in the specified context. (Required)

applicationName

String

The name of the application container of the property sheet which owns the property.

applicationTierName

String

The name of the application tier container of the property sheet which owns the property.

archiveConnectorName

String

The name of the archive connector of the property sheet which owns the property.

artifactName

String

The name of the artifact container of the property sheet which owns the property.

artifactVersionName

String

The name of the artifactVersion container of the property sheet which owns the property.

catalogName

String

The name of the catalog of the property sheet which owns the property.

ciBuildDetailName

String

The name of the CI build detail of the property sheet which owns the property.

clusterName

String

The name of the cluster which owns property sheet.

componentName

String

The name of the component container of the property sheet which owns the property.

configName

String

The name of the emailConfig container that owns the property.

containerName

String

The name of the container that owns the property.

credentialName

String

The name of the credential container of the property sheet which owns the property.

dashboardName

String

The name of the dashboard of the property sheet which owns the property.

dataRetentionPolicyName

String

The name of the data retention policy of the property sheet which owns the property.

environmentName

String

The name of the environment container of the property sheet which owns the property.

environmentTemplateName

String

The name of the environment template container of the property sheet which owns the property.

environmentTemplateTierName

String

The name of the environment template tier container of the property sheet which owns the property.

environmentTierName

String

The name of the environment tier container of the property sheet which owns the property.

flowName

String

The name of the flow container of the property sheet which owns the property.

flowRuntimeId

String

The primary key or name of the flowRuntime container of the property sheet which owns the property.

flowRuntimeName

String

The name of the flow runtime container of the property sheet which owns the property.

flowRuntimeStateId

String

The primary key or name of the flowRuntimeState container of the property sheet which owns the property.

flowRuntimeStateName

String

The name of the flow state container of the property sheet which owns the property.

flowStateName

String

The name of the flow state container of the property sheet which owns the property.

flowTransitionName

String

The name of the flow transition container of the property sheet which owns the property.

gateType

String

The type of the gate which owns property sheet.

gatewayName

String

The name of the gateway container of the property sheet.

groupName

String

The name of the group container of the property sheet which owns the property.

jobId

String

The primary key or name of the job container of the property sheet which owns the property.

jobStepId

String

The primary key of the job-step container of the property sheet which owns the property.

notifierName

String

The name of the notifier container of the property sheet which owns the property.

objectId

String

The object id as returned by FindObjects.

path

String

Property path string.

pipelineName

String

The name of the pipeline container of the property sheet which owns the property.

pluginName

String

The name of the plugin container of the property sheet which owns the property.

procedureName

String

The name of the procedure container of the property sheet which owns the property.

processName

String

The name of the process, if the container is a process or process step.

processStepName

String

The name of the process step, if the container is a process step.

projectName

String

The name of the project container of the property sheet which owns the property.

propertySheetId

String

The primary key of the property sheet which owns the property.

releaseName

String

The name of the release container of the property sheet which owns the property.

reportName

String

The name of the report of the property sheet which owns the property.

reportObjectTypeName

String

The name of the report object type of the property sheet which owns the property.

repositoryName

String

The name of the repository container of the property sheet which owns the property.

resourceName

String

The name of the resource container of the property sheet which owns the property.

resourcePoolName

String

The name of the resource pool container of the property sheet which owns the property.

resourceTemplateName

String

The name of the resource template container of the property sheet which owns the property.

scheduleName

String

The name of the schedule container of the property sheet.

searchFilterName

String

The name of the search filter container of the property sheet.

serviceAccountName

String

Get the name of the service account container of the property sheet

serviceName

String

The name of the service container of the property sheet.

snapshotName

String

The name of the snapshot container of the property sheet which owns the property.

stageName

String

The name of the stage container of the property sheet which owns the property.

stateDefinitionName

String

The name of the state definition container of the property sheet which owns the property.

stateName

String

The name of the state container of the property sheet which owns the property.

stepName

String

The name of the step container of the property sheet which owns the property.

systemObjectName

String

The system object.

taskName

String

The name of the task which owns property sheet.

transitionDefinitionName

String

The name of the transition definition container of the property sheet which owns the property.

transitionName

String

The name of the transition container of the property sheet which owns the property.

userName

String

The name of the user container of the property sheet which owns the property.

widgetName

String

The name of the widget of the property sheet which owns the property.

workflowDefinitionName

String

The name of the workflow definition container of the property sheet which owns the property.

workflowName

String

The name of the workflow container of the property sheet which owns the property.

workspaceName

String

The name of the workspace container of the property sheet.

zoneName

String

The name of the zone container of the property sheet.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.expandString(
                value: 'test-value'
                /* optional arguments */)

export

Export part or all of the server data to an XML file. --compress can be used to compress the XML output. --excludeJobs can be used to exclude jobs from the export data. --path will export the single object specified by the path. The default is to export all data in the system.

Arguments

Argument Name Type Description

fileName

String

The filename from/to which the import/export is done. (Required)

compress

Boolean

If true, the output will be compressed.

disableProjectTracking

Boolean

If set to true when importing or exporting a project, even if the original project had change tracking enabled, make change tracking of the newly imported or exported project be disabled from its creation. If you don’t need to track changes to the new project, this avoids the change tracking overhead that would otherwise slow down the import operation, and also saves having to subsequently disable change tracking of the reimported project.

download

Boolean

Export file will be available to download

excludeJobs

Boolean

True to exclude jobs from the export.

objectId

String

Object id

objectType

String

Object type

path

String

A property path indicating a single object to be exported (for export) or the location at which to import (for import).

reducedDetailChangeHistory

Boolean

Set to 0 or false to prevent importing a large project that has change tracking enabled from automatically reducing the level of detail that it tracks for the change history of the import — this will make the import operation take longer and put more load on the database, but will allow the Change History feature to still show the full detail of entities owned by the imported project that were created by the import operation.

relocatable

Boolean

True to emit relocatable content (no ids, acls, or times)

revisionNumber

Integer

Revision number

safeMode

String

Determines the mode to use during a full export. If set to 'none', the default behavior applies. If set to 'restart', then the server will be stopped during the full export and restarted on completion. If set to 'shutdown', then the server will be stopped during the full export and shutdown on completion.

withAcls

Boolean

True to emit acls in relocatable exports.

withNotifiers

Boolean

True to emit emailNotifiers in relocatable exports.

withVersionNumbers

Boolean

True to emit version numbers (ignored on import)

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.export(
                fileName: 'test-fileName'
                /* optional arguments */)

getCIJob

Retrieve the details of a CI job for the given CI configuration.

Arguments

Argument Name Type Description

ciConfigurationName

String

CI Configuration name (Required)

ciJobName

String

CI Job name

folder

String

Path to the folder on the CI server referenced by the CI configuration that contains the CI jobs. Must be in format folder1/folder2/folder3/…​ .

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getCIJob(
                ciConfigurationName: 'test-ciConfigurationName'
                /* optional arguments */)

getCIJobParameters

Retrieve the parameters for the given CI job.

Arguments

Argument Name Type Description

ciJobName

String

Name of the CI job (Required)

ciConfigurationName

String

CI Configuration name (Required)

folder

String

Path to the folder on the CI server referenced by the CI configuration that contains the CI jobs. Must be in format folder1/folder2/folder3/…​ .

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getCIJobParameters(
                ciJobName: 'test-ciJobName',
                ciConfigurationName: 'test-ciConfigurationName'
                /* optional arguments */)

getCIJobs

Retrieve the list of CI jobs or folders within the given folder (if provided) or at root level for the given CI configuration.

Arguments

Argument Name Type Description

ciConfigurationName

String

CI Configuration name (Required)

folder

String

Path to the folder on the CI server referenced by the CI configuration that contains the CI jobs. Must be in format folder1/folder2/folder3/…​ .

jobSearchType

String

Specify job search type: FOLDER to return all folders, JOB (default) to return all other job types, or ALL to return both jobs and folders

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getCIJobs(
                ciConfigurationName: 'test-ciConfigurationName'
                /* optional arguments */)

getDashboardVisualizations

Retrieve all dashboard visualizations.

Arguments

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getDashboardVisualizations()

getDatabaseConfiguration

Returns the current database configuration.

Arguments

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getDatabaseConfiguration()

getDevOpsInsightServerConfiguration

Returns the current devOps insight server configuration.

Arguments

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getDevOpsInsightServerConfiguration()

getServerConfiguration

Retrieve a system property by name.

Arguments

Argument Name Type Description

configName

String

Name for the system property.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerConfiguration(
                /* optional arguments */)

getServerInfo

Return information about server ports and message delivery

Arguments

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerInfo()

getServerStatus

Return the current status of the server, including log message generated during the startup sequence.

Arguments

Argument Name Type Description

block

Boolean

True means wait until the server reaches a new state.

diagnostics

Boolean

True to include server diagnostics.

serverStateOnly

Boolean

The response includes only the serverState element.

timeout

Integer

How many seconds before the blocking command times out.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getServerStatus(
                /* optional arguments */)

getSsoConfiguration

Gets the SSO Server configuration.

Arguments

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getSsoConfiguration()

getVersions

Return server version information.

Arguments

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getVersions()

import

Import data from an XML export file. If --disableSchedules is '1', any imported schedules will be disabled. --path can be used to import a single object to a different location from where it was exported. --force can be provided to replace a single object at the provided path.

Use 'callImport' as the method name for invoking the 'import' API. 'import' is a groovy keyword therefore it cannot be used as a method name.

Arguments

Argument Name Type Description

fileName

String

The filename from/to which the import/export is done. (Required)

batchSize

Integer

The number of objects that are imported before they’re committed to the database.

disableProjectTracking

Boolean

If set to true when importing or exporting a project, even if the original project had change tracking enabled, make change tracking of the newly imported or exported project be disabled from its creation. If you don’t need to track changes to the new project, this avoids the change tracking overhead that would otherwise slow down the import operation, and also saves having to subsequently disable change tracking of the reimported project.

disableSchedules

Boolean

If true, imported schedules will be disabled.

force

Boolean

True to replace existing object when doing a single-object import.

path

String

A property path indicating a single object to be exported (for export) or the location at which to import (for import).

preserveId

Boolean

If true, import will attempt to preserve the object id during a single-object import.

preserveNames

Boolean

If true, will attempt to preserve names during a simgle-object import.

reducedDetailChangeHistory

Boolean

Set to 0 or false to prevent importing a large project that has change tracking enabled from automatically reducing the level of detail that it tracks for the change history of the import — this will make the import operation take longer and put more load on the database, but will allow the Change History feature to still show the full detail of entities owned by the imported project that were created by the import operation.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.callImport(
                fileName: 'test-fileName'
                /* optional arguments */)

logStatistic

Emit a statistics value to statsd.

Arguments

Argument Name Type Description

type

String

The type of statistic to emit. (Required)

name

String

The name of the statistic to emit. (Required)

value

Integer

The value of the statistic to emit. (Required)

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.logStatistic(
                type: 'test-type',
                name: 'test-name',
                value: 'test-value')

pruneChangeHistory

Prune obsolete-for-days data from the Change History tables

Arguments

Argument Name Type Description

daysToKeep

Integer

Number of days' of change history data to keep (minimum seven). (Required)

batchedDelete

Boolean

Allows to split records deletion queries by chuncks to minimize usage of transaction undo log.

forcePruneAll

Boolean

Override the supplied value of daysToKeep and prune the entire change history, keeping nothing discardable (normally not a good idea — this is mostly intended for testing).

pruneUpgradeObsolete

Boolean

Ignore the supplied value of daysToKeep and instead prune all change data that is obsolete in this version of CloudBees Flow. If you make extensive use of Stage entities, and have change history dating from to releases before CloudBees Flow 9.0, then running this once after the unpgrade to 9.0 should reclaim some database space and might improve change history performance.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.pruneChangeHistory(
                daysToKeep: 'test-daysToKeep'
                /* optional arguments */)

setDatabaseConfiguration

Sets the database configuration in the server. If the server is in bootstrap mode, these changes take effect immediately, and the server will attempt to start. If the server is already running, these changes have no effect until the server is restarted.

Arguments

Argument Name Type Description

customDatabaseDialect

String

Class name of the Hibernate dialect (advanced use only — the server will choose an appropriate dialect base on databaseType)

customDatabaseDriver

String

Class name of the JDBC driver (advanced use only — the server will choose an appropriate driver based on databaseType)

customDatabaseUrl

String

The JDBC URL to use (advanced use only — the server will compose an appropriate URL)

databaseName

String

The database instance name. Defaults to 'commander' if left out.

databaseType

String

The database type. Defaults to 'builtin'.

hostName

String

The domain name or IP address of the server machine corresponding to this resource.

ignorePasskeyMismatch

Boolean

If true, ignore a passkey fingerprint mismatch between the current passkey file and the database configuration, discarding stored credentials.

ignoreServerMismatch

Boolean

If true, ignore a host name mismatch between the current server and the database configuration.

password

String

The password used to connect to the database.

port

Integer

Port number to use when connecting to the agent for this resource; defaults to server default.

preserveSessions

Boolean

If true, preserve sessions when ignoring server host name mismatches.

userName

String

The user name used to connect to the database.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.setDatabaseConfiguration(
                /* optional arguments */)

setDevOpsInsightServerConfiguration

Sets the DevOps Insight Server configuration.

Arguments

Argument Name Type Description

elasticSearchUrl

String

CloudBees Flow server retrieves data from ElasticSearch using this URL. This URL must be set if DevOps Insight is enabled.

enabled

Boolean

If true, enables DevOps Insight.

logStashUrl

String

This is the URL where LogStash receives data from CloudBees Flow server. This URL must be set if DevOps Insight is enabled.

password

String

Password for authenticating with the DevOps Insight Server.

testConnection

Boolean

Whether the connection to the DevOps Insight Server should be tested before saving the configuration. Defaults to false.

userName

String

Username for authenticating with the DevOps Insight Server.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.setDevOpsInsightServerConfiguration(
                /* optional arguments */)

setSsoConfiguration

Sets the SSO Server configuration.

Arguments

Argument Name Type Description

enableSsoKerberos

Boolean

Enable or disable SSO Kerberos

enableSsoSaml

Boolean

Enable or disable SSO SAML

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.setSsoConfiguration(
                /* optional arguments */)

shutdownServer

Shut down the CloudBees Flow server.

Arguments

Argument Name Type Description

force

Boolean

If true, shutdown is forced — the server exits without any cleanup.

restart

Boolean

If true, the server is restarted after shutdown.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.shutdownServer(
                /* optional arguments */)