Use these commands to manage team assets stored in Git repositories.
-
Store the model DSL in a Git repository.
-
Commit subsequent edits to the repository.
-
Set up a source code synchronization (
scmSync
) object to automatically push changes to the server.
createScmSync
Creates a new source code synchronization object.
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name of the CloudBees CD/RO project that must be unique among all projects. |
scmSyncName |
String |
(Required) The name of this |
branch |
String |
The name of the branch in the repository specified with the |
configurationName |
String |
The EC-Git plugin configuration name. Refer to Create plugin configurations for details. |
configurationProjectName |
String |
The 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 the local SCM repository is located. |
excludeObjects |
List |
List of object paths to exclude from synchronization. |
exportParameters |
List |
Comma separated list of import parameters. |
importParameters |
List |
Comma separated list of import parameters. |
includeObjects |
List |
List of object paths to include in synchronization. |
relativePath |
String |
Relative path. |
repository |
String |
The name of the repository containing scmSync assets. |
resourceName |
String |
Resource name |
scmType |
String |
The type of SCM. Currently, |
syncType |
String |
The type of synchronization: to or from the SCM. Currently, only supported value is |
Response
<response requestId="1" nodeId="192.168.1.217"> <scmSync> <scmSyncId>5ce0f6b0-3cef-11ec-8d74-12f00530b5d8</scmSyncId> <scmSyncName>testScmSyncName</scmSyncName> <branch>main</branch> <configurationName>my-git-config</configurationName> <configurationProjectName>Default </configurationProjectName> <createTime>2021-11-03T21:45:29.474Z</createTime> <destinationDir>c:\tmp</destinationDir> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-11-03T21:45:29.474Z</modifyTime> <owner>admin</owner> <projectName>Default</projectName> <propertySheetId>5ce0f6b2-3cef-11ec-8d74-12f00530b5d8 </propertySheetId> <repository>Repo</repository> <resourceName>local</resourceName> <scmType>git</scmType> <syncType>fromScm</syncType> <tracked>1</tracked> </scmSync> </response>
ectool usage
Usage: createScmSync <projectName> <scmSyncName> [--branch <branch>] [--configurationName <configurationName>] [--configurationProjectName <configurationProjectName>] [--description <description>] [--destinationDir <destinationDir>] [--excludeObjects excludeObject1 excludeObject2 ...] [--exportParameter exportParameter1 exportParameter2 ...] [--importParameter <var1>=<val1> [<var2>=<val2> ...]] [--includeObjects includeObject1 includeObject2 ...] [--relativePath <relativePath>] [--repository <repository>] [--resourceName <resourceName>] [--scmType <git>] [--syncType <fromScm|toScm>]
deleteScmSync
Deletes a source code synchronization object.
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name of the CloudBees CD/RO project that must be unique among all projects. |
scmSyncName |
String |
(Required) The name of the |
getScmSync
Retrieve a source code synchronization object by name.
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name of the CloudBees CD/RO project that must be unique among all projects. |
scmSyncName |
String |
(Required) The name of the |
Response
<response requestId="1" nodeId="192.168.1.217"> <scmSync> <scmSyncId>e8f820df-3dab-11ec-9379-12f00530b5d8</scmSyncId> <scmSyncName>testScmSync1</scmSyncName> <branch>main</branch> <configurationName>my-git-config</configurationName> <configurationProjectName>Default</configurationProjectName> <createTime>2021-11-04T20:15:09.892Z</createTime> <destinationDir>c:\tmp</destinationDir> <gitWebhookRepository>Repo</gitWebhookRepository> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-11-04T20:15:09.892Z</modifyTime> <owner>admin</owner> <projectName>Default</projectName> <propertySheetId>e8f820e1-3dab-11ec-9379-12f00530b5d8</propertySheetId> <repository>Repo</repository> <resourceName>local</resourceName> <scmType>git</scmType> <syncType>fromScm</syncType> <tracked>1</tracked> <triggerEnabled>0</triggerEnabled> </scmSync> </response>
getScmSyncs
Retrieve all source code synchronization objects for the specified project.
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name of the CloudBees CD/RO project that must be unique among all projects. |
Response
<response requestId="1" nodeId="192.168.1.217"> <scmSync> <scmSyncId>e8f820df-3dab-11ec-9379-12f00530b5d8</scmSyncId> <scmSyncName>testScmSync1</scmSyncName> <branch>main</branch> <configurationName>my-git-config</configurationName> <configurationProjectName>Default</configurationProjectName> <createTime>2021-11-04T20:15:09.892Z</createTime> <destinationDir>c:\tmp</destinationDir> <gitWebhookRepository>Repo</gitWebhookRepository> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-11-04T20:15:09.892Z</modifyTime> <owner>admin</owner> <projectName>Default</projectName> <propertySheetId>e8f820e1-3dab-11ec-9379-12f00530b5d8</propertySheetId> <repository>Repo</repository> <resourceName>local</resourceName> <scmType>git</scmType> <syncType>fromScm</syncType> <tracked>1</tracked> <triggerEnabled>0</triggerEnabled> </scmSync> <scmSync> ... </scmSync> </response>
modifyScmSync
Modify an existing source code synchronization object.
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name of the CloudBees CD/RO project that must be unique among all projects. |
scmSyncName |
String |
(Required) The name of this |
branch |
String |
The name of the branch in the repository specified with the |
clearExcludeObjects |
Boolean |
<0|1|true|false> Whether or not to clear exclude objects for this object. |
clearIncludeObjects |
Boolean |
<0|1|true|false> Whether or not to clear include objects for this object. |
configurationName |
String |
The EC-Git plugin configuration name. Refer to Create plugin configurations for details. |
configurationProjectName |
String |
The 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 is located. |
excludeObjects |
List |
List of object paths to exclude from synchronization. |
exportParameters |
List |
Comma separated list of import parameters. |
importParameters |
List |
Comma separated list of import parameters. |
includeObjects |
List |
List of object paths to include in synchronization. |
newName |
String |
New name for the existing |
relativePath |
String |
Relative path. |
repository |
String |
The name of the repository containing |
resourceName |
String |
Resource name |
scmType |
String |
The type of SCM. Currently, |
syncType |
String |
The type of SCM synchronization. The only supported value is |
triggerEnabled |
Boolean |
<0|1|true|false> Set to |
Response
<response requestId="1" nodeId="192.168.1.217"> <scmSync> <scmSyncId>e8f820df-3dab-11ec-9379-12f00530b5d8</scmSyncId> <scmSyncName>testScmSync1</scmSyncName> <branch>next</branch> <configurationName>my-git-config</configurationName> <configurationProjectName>Default</configurationProjectName> <createTime>2021-11-04T20:15:09.892Z</createTime> <destinationDir>c:\tmp</destinationDir> <gitWebhookRepository>Repo</gitWebhookRepository> <lastModifiedBy>admin</lastModifiedBy> <modifyTime>2021-11-04T20:15:09.892Z</modifyTime> <owner>admin</owner> <projectName>Default</projectName> <propertySheetId>e8f820e1-3dab-11ec-9379-12f00530b5d8</propertySheetId> <repository>Repo</repository> <resourceName>local</resourceName> <scmType>git</scmType> <syncType>fromScm</syncType> <tracked>1</tracked> <triggerEnabled>0</triggerEnabled> </scmSync> </response>
ectool usage
Usage: modifyScmSync <projectName> <scmSyncName> [--branch <branch>] [--clearExcludeObjects <0|1|true|false>] [--clearIncludeObjects <0|1|true|false>] [--configurationName <configurationName>] [--configurationProjectName <configurationProjectName>] [--description <description>] [--destinationDir <destinationDir>] [--excludeObjects excludeObject1 excludeObject2 ...] [--exportParameter exportParameter1 exportParameter2 ...] [--importParameter <var1>=<val1> [<var2>=<val2> ...]] [--includeObjects includeObject1 includeObject2 ...] [--newName <newName>] [--relativePath <relativePath>] [--repository <repository>] [--resourceName <resourceName>] [--scmType <git>] [--syncType <fromScm|toScm>] [--triggerEnabled <0|1|true|false>]
runScmSync
Run the specified source code synchronization object.
Arguments
Argument Name | Type | Description |
---|---|---|
projectName |
String |
(Required) The name of the CloudBees CD/RO project that must be unique among all projects. |
scmSyncName |
String |
(Required) The name of the |
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. |
Response
<response requestId="1" nodeId="192.168.1.217"> <jobId>cdfde653-3db0-11ec-a9da-12f00530b5d8</jobId> </response>