Applications commands

3 minute readReference

createApplication

Creates a new application for a project.

You must specify the projectName and applicationName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

applicationName

Name of the microservice application that must be unique among all projects.

Argument Type: String

applicationType

(Optional) Type of the application. Type is either traditional (default) or microservice.

Argument Type: String

description

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

Argument Type: String

Positional arguments

projectName, applicationName

Response

Returns an application element.

ec-perl

syntax: $<object>->createApplication(<projectName>, <applicationName>, {<optionals>});

Example

$ec->createApplication("Default", "Deploy", {description => "QA testing"});

ectool

syntax: ectool createApplication <projectName> <applicationName> [optionals]

Example

ectool createApplication "Default" "Deploy" --description "QA testing"

deleteApplication

Deletes an application.

You must specify the projectName and applicationName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

applicationName

Name of the application that must be unique among all projects.

Argument Type: String

foreground

(Optional) < Boolean flag— 0|1|true|false >

If set to 1 or true, the object in the foreground is deleted. The default is 0 or false, which deletes the object in the background.

Argument Type: Boolean

retainInventory

(Optional) < Boolean flag— 0|1|true|false >

Whether to delete the environment inventory when this application is deleted.

  • If set to 1 or true, retain the environment inventory. If set 0 or false, delete the environment inventory. (Default)

Argument Type: Boolean

Positional arguments

projectName, applicationName

Response

None or a status OK message.

ec-perl

syntax: $<object>->deleteApplication (<projectName>, <applicationName>);

Example

$ec->deleteApplication ("Default", "Undeploy");

ectool

syntax: ectool deleteApplication <projectName> <applicationName>

Example

ectool deleteApplication "Default" "Undeploy"

getApplication

Retrieves an application by name.

You must specify the projectName and applicationName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

applicationName

Name of the application that must be unique among all projects.

Argument Type: String

applicationEntityRevisionId

(Optional) The revision ID of the versioned object.

Argument type: UUID

validate

(Optional) < Boolean flag— 0|1|true|false >

Whether to validate with these rules. Default is false or 0.

For microservice applications:

  • The application has at least one microservice. If there are more than one, all of their definitions must be complete.

  • Each environment has at least one utility resource.

  • Each environment has at least one cluster defined.

  • The application has at least one complete mapping to any of the tierMaps to an environment. If there is more than one tierMap entry, at least one of them must be complete. Since a validation takes place in the process run to check for partially mapped tierMap, the intent here is to enforce mapping to at least one tierMap. If there is more than one microservice, each of them must have a complete mapping to at least one environment. If not, the mapping is incomplete.

  • The application has at least one process defined.

For traditional applications:

  • Must contain at least one application tier

  • Must contain at least one tier map

  • Must contain at least one process

  • Must be mapped to at least one environment

Positional arguments

projectName, applicationName

Response

Retrieves the specified application element.

ec-perl

syntax: $<object>->getApplication(<projectName>, <applicationName>, {<optionals>});

Example

$ec->getApplication("Default", "Deploy", {applicationEntityRevisionId => "4fa765dd-73f1-11e3-b67e-b0a420524153"});

ectool

syntax: ectool getApplication <projectName> <applicationName> [optionals]

Example

ectool getApplication "Default" "Deploy" --applicationEntityRevisionId 4fa765dd-73f1-11e3-b67e-b0a420524153

getApplications

Retrieves the specified applications in a project.

You must specify the projectName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

applicationType

(Optional) Name of the microservice application. Type is either traditional (default) or microservice.

Argument Type: String

Use when applicationType is traditional.

includeEntityRevisions

(Optional) < Boolean flag— 0|1|true|false >

If set to 1 or true, the search results include the revisions of application.

Argument type: Boolean

referenceComponentName

(Optional) Name of the master component.

Argument Type: String

referenceComponentProject

(Optional) Project to which the master component belongs.

Argument Type: String

Positional arguments

projectName

Response

Retrieves zero or more application elements.

ec-perl

syntax: $<object>->getApplications(<projectName>, {<optionals>});

Example

$ec->getApplications("Default", {referenceComponentProject => "Financial Summaries"});

ectool

syntax: ectool getApplications <projectName> [optionals]

Example

ectool getApplications "Default" --referenceComponentProject "Financial Summaries"

modifyApplication

Modifies an existing application.

You must specify the projectName and the applicationName.

Arguments Descriptions

projectName

Name of the project. This name must be unique among all projects.

Argument Type: String

Argument Type: String

applicationName

Name of the application that must be unique within the project.

Argument Type: String

applicationType

(Optional) Name of the microservice application that must be unique among all projects. Type is either traditional (default) or microservice.

Argument Type: String

description

(Optional) Comment text describing this object; not interpreted at all by CloudBees CD/RO .

Argument Type: String

newName

(Optional) New name for an existing object that is being renamed.

Argument Type: String

Positional arguments

projectName, applicationName

Response

Returns a modified application element.

ec-perl

syntax: $<object>->modifyApplication(<projectName>, <applicationName>, {<optionals>});

Example

$ec->modifyApplication("Default", "Deploy config", {newName=> "Deploy WAR file", description => "Pet store website"});

ectool

syntax: ectool modifyApplication <projectName> <applicationName> [optionals]

Example

ectool modifyApplication "Default" "Deploy config" --newName "Deploy WAR file" --description "Pet Store website"