Hook commands

createHook

Creates a new hook.

Arguments

Argument Name Type Description

hookName

String

Name for the hook; must be unique among all hooks. (Required)

projectName

String

projectName of the entity that owns the hook

procedureName

String

hook procedure name

broadcast

Boolean

broadcast flag

description

String

Comment text describing this object that is not interpreted at all by CloudBees Flow.

hookParameters

array

hook parameters

hookType

String

hook type

procedurePluginKey

String

procedure plugin key

procedureProjectName

String

procedure project name

resourceTemplateName

String

Name of the resource template.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.createHook(
                hookName: 'test-hookName'
                /* optional arguments */)

deleteHook

Deletes a hook associated with an entity.

Arguments

Argument Name Type Description

hookName

String

Name for the hook; must be unique among all hooks. (Required)

projectName

String

projectName of the entity that owns the hook

resourceTemplateName

String

Name of the resource template.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.deleteHook(
                hookName: 'test-hookName')

getHook

Get a hook associated with an entity.

Arguments

Argument Name Type Description

hookName

String

Name for the hook; must be unique among all hooks. (Required)

projectName

String

projectName of the entity that owns the hook

resourceTemplateName

String

Name of the resource template.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getHook(
                hookName: 'test-hookName')

getHooks

Get all Hooks associated with an entity.

Arguments

Argument Name Type Description

projectName

String

projectName of the entity that owns the hook

resourceTemplateName

String

Name of the resource template.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.getHooks()

modifyHook

Modifies an existing hook.

Arguments

Argument Name Type Description

hookName

String

Name for the hook; must be unique among all hooks. (Required)

projectName

String

projectName of the entity that owns the hook

procedureName

String

hook procedure name

broadcast

Boolean

broadcast flag

description

String

Comment text describing this object that is not interpreted at all by CloudBees Flow.

hookParameters

array

hook parameters

hookType

String

hook type

newName

String

New name for an existing object that is being renamed.

procedurePluginKey

String

procedure plugin key

procedureProjectName

String

procedure project name

resourceTemplateName

String

Name of the resource template.

Usage

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


ElectricFlow ef = new ElectricFlow()

def result = ef.modifyHook(
                hookName: 'test-hookName'
                /* optional arguments */)