ScmSync

2 minute readReference

createScmSync

Creates a new source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

scmSyncName

String

Name of SCM Sync. (Required)

branch

String

The branch

configurationName

String

Configuration name.

configurationProjectName

String

Configuration project name.

description

String

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

destinationDir

String

Destination directory on the agent where local SCM repository will be located.

excludeObjects

String array

List of paths to the objects that should not be synchronized.

exportParameters

List of export parameters.

importParameters

List of import parameters.

includeObjects

String array

List of paths to the objects that should be synchronized.

relativePath

String

Relative path.

repository

String

The SCM repository.

resourceName

String

Resource name.

scmType

String

Specify the type of SCM.

syncType

String

Specify whether it’s a sync from SCM or to SCM.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.createScmSync( projectName: 'test-projectName', scmSyncName: 'test-scmSyncName' /* optional arguments */)

deleteScmSync

Deletes a source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

scmSyncName

String

Name of SCM Sync. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.deleteScmSync( projectName: 'test-projectName', scmSyncName: 'test-scmSyncName')

getScmSync

Retrieves a source code synchronization object by name.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

scmSyncName

String

Name of SCM Sync. (Required)

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.getScmSync( projectName: 'test-projectName', scmSyncName: 'test-scmSyncName')

getScmSyncs

Retrieves all source code synchronization objects for the specified project.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

Usage

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

modifyScmSync

Modifies an existing source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

The name for the project that must be unique among all projects. (Required)

scmSyncName

String

Name of SCM Sync. (Required)

branch

String

The branch

clearExcludeObjects

Boolean

Whether or not to clear exclude objects for this object.

clearIncludeObjects

Boolean

Whether or not to clear include objects for this object.

configurationName

String

Configuration name.

configurationProjectName

String

Configuration project name.

description

String

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

destinationDir

String

Destination directory on the agent where local SCM repository will be located.

excludeObjects

String array

List of paths to the objects that should not be synchronized.

exportParameters

List of export parameters.

importParameters

List of import parameters.

includeObjects

String array

List of paths to the objects that should be synchronized.

newName

String

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

relativePath

String

Relative path.

repository

String

The SCM repository.

resourceName

String

Resource name.

scmType

String

Specify the type of SCM.

syncType

String

Specify whether it’s a sync from SCM or to SCM.

triggerEnabled

Boolean

True if trigger configured and enabled, false otherwise.

Usage

import com.electriccloud.client.groovy.ElectricFlow import com.electriccloud.client.groovy.models.* ElectricFlow ef = new ElectricFlow() def result = ef.modifyScmSync( projectName: 'test-projectName', scmSyncName: 'test-scmSyncName' /* optional arguments */)