createComponent

Back to index

Summary

Creates a new component for a project.
projectName
Stringrequired
The name for the project that must be unique among all projects.
componentName
Stringrequired
The name of the component.
actualParameter
Arrayoptional
Parameters passed as arguments to the application component.
applicationName
Stringoptional
The name of an application to scope this component to.
credentialName
Stringoptional
The name of a credential to attach to this component.
description
Stringoptional
Comment text describing this object that is not interpreted at all by CloudBees CD/RO.
pluginKey
Stringoptional
The key of the plugin.
pluginName
Stringoptional
The name of the plugin.
pluginParameter
Arrayoptional
List of plugin parameters.
reference
Booleanoptional
If 1 or true, a reference of the component is created. If 0 or false, a copy of the component is created.
sourceApplicationName
Stringoptional
The name of the source application.
sourceComponentName
Stringoptional
The name of new component.
sourceProjectName
Stringoptional
The name of source project.

Usage

Perl

$cmdr->createComponent( "test-projectName", # projectName "test-componentName" # componentName # optionals );

ectool

ectool createComponent \ "test-projectName" `# projectName` \ "test-componentName" `# componentName` \ # optionals

Examples

Usage guidelines

  • To create a new component, use pluginKey or pluginName.

    ectool example: --pluginKey or --pluginName

  • To create an application component by copying a master component, use applicationName, sourceComponentName, sourceProjectName, and reference = 0.

    ectool example: --applicationName, --sourceComponentName, --sourceProjectName, --reference 0

  • To create a master component by copying another master component, use sourceComponentName, sourceProjectName,and reference = 0.

    ectool example: --sourceComponentName, --sourceProjectName, --reference 0

  • To create an application component by copying another application component, use applicationName, sourceComponentName, sourceApplicationName, sourceProjectName, and reference = 0.

    ectool example: --applicationName, --sourceComponentName, --sourceApplicationName, --sourceProjectName, --reference 0

  • To create a master component from an application component, use sourceComponentName, sourceApplicationName, sourceProjectName, and reference = 0.

    ectool example: --sourceComponentName, --sourceApplicationName, --sourceProjectName, --reference 0

  • To create a reference of the master component, use applicationName, sourceComponentName, sourceProjectName, and reference = 1.

    ectool example: --applicationName, --sourceComponentName, --sourceProjectName, --reference 1

Perl

To create a new component:

$cmdr->createComponent("Default", "Cleanup DB", {pluginName => "EC-Maven"});

To create an application component by copying a master component:

$cmdr->createComponent("Default", "Cleanup DB", {applicationName => "Deploy", sourceComponentName => "Backup DB", sourceProjectName => "Archive", reference => 0});

ectool

To create a new component:

ectool createComponent "Default" "Cleanup DB" --pluginName "EC-Maven"

To create an application component by copying a master component:

ectool createComponent "Default" "Cleanup DB" --applicationName "Deploy" --sourceComponentName "Backup DB" --sourceProjectName "Archive" --reference 0