Groovy API reference

SCM sync

3 minute readReference

createScmSync

Creates a new source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

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

scmSyncName

String

(Required) Name of Scm Sync.

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

Collection

List of paths to the objects that should not be synchronized

exportParameters

Map

List of export parameters.

importParameters

Map

List of import parameters.

includeObjects

Collection

List of paths to the objects that should be synchronized.

relativePath

String

Relative path.

repository

String

Scm repository.

resourceName

String

Resource name.

scmType

ScmType

Specify the type of SCM.

syncType

ScmSyncType

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

Positional arguments

projectName, scmSyncName

Usage

ec-perl

$cmdr->createScmSync(<projectName>, <scmSyncName>, {<optionals>});

ectool

ectool createScmSync projectName,  scmSyncName, [optionals]

deleteScmSync

Deletes a source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

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

scmSyncName

String

(Required) Name of Scm Sync.

Positional arguments

projectName, scmSyncName

Usage

ec-perl

$cmdr->deleteScmSync(<projectName>, <scmSyncName>);

ectool

ectool deleteScmSync projectName,  scmSyncName

getScmSync

Retrieves a source code synchronization object by name.

Arguments

Argument Name Type Description

projectName

String

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

scmSyncName

String

(Required) Name of Scm Sync.

Positional arguments

projectName, scmSyncName

Usage

ec-perl

$cmdr->getScmSync(<projectName>, <scmSyncName>);

ectool

ectool getScmSync projectName,  scmSyncName

getScmSyncs

Retrieves all source code synchronization objects for the specified project.

Arguments

Argument Name Type Description

projectName

String

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

Positional arguments

projectName

Usage

ec-perl

$cmdr->getScmSyncs(<projectName>);

ectool

ectool getScmSyncs projectName

modifyScmSync

Modifies an existing source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

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

scmSyncName

String

(Required) Name of Scm Sync.

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

Collection

List of paths to the objects that should not be synchronized

exportParameters

Map

List of export parameters.

importParameters

Map

List of import parameters.

includeObjects

Collection

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

ScmType

Specify the type of SCM.

syncType

ScmSyncType

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

triggerEnabled

Boolean

True if trigger configured and enabled, false otherwise.

Positional arguments

projectName, scmSyncName

Usage

ec-perl

$cmdr->modifyScmSync(<projectName>, <scmSyncName>, {<optionals>});

ectool

ectool modifyScmSync projectName,  scmSyncName, [optionals]

runScmSync

Runs the specified source code synchronization object.

Arguments

Argument Name Type Description

projectName

String

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

scmSyncName

String

(Required) Name of Scm Sync.

parsedWebhookData

String

JSON with parsed webhook data to be set on a pipeline/release/procedure run.

webhookData

String

The webhook data to be set on the pipeline/release/procedure run.

webhookHeaders

String

The webhook headers in JSON format to be set on the pipeline/release/procedure run.

Positional arguments

projectName, scmSyncName

Usage

ec-perl

$cmdr->runScmSync(<projectName>, <scmSyncName>, {<optionals>});

ectool

ectool runScmSync projectName,  scmSyncName, [optionals]