ScmSync

3 minute readReference

createScmSync

[PREVIEW] This API is in preview mode, and therefore subject to change. 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

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

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

[PREVIEW] This API is in preview mode, and therefore subject to change. 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

[PREVIEW] This API is in preview mode, and therefore subject to change. 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

[PREVIEW] This API is in preview mode, and therefore subject to change. 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

[PREVIEW] This API is in preview mode, and therefore subject to change. 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

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

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