CI job commands

2 minute readReference

These commands fetch native CI jobs and, for jobs so configured, its parameters.

getCIJob

Gets the specified CI job.

Arguments Descriptions

ciConfigurationName

The name of the CI configuration for the server that contains ciJobName.

Argument Type: String

ciJobName

The name of the CI job to retrieve.

folder

(Optional) Path to the folder on the CI server referenced by ciConfigurationName that contains the specified CI job. Must be in format folder1/folder2/folder3/…​.

If not specified, the root level for ciConfigurationName is used.

Positional arguments

ciConfigurationName

Response

Returns a ciJob object.

ec-perl

syntax: $cmdr->getCIJob (<ciConfigurationName>, <ciJobName>, {<optionals>});

Example

$cmdr->getCIJob
  (
    ciConfigurationName => "CI Build Demo", ciJobName => "build-with-params"
  );

ectool

syntax: ectool getCIJob <ciConfigurationName> <ciJobName> [optionals]

Example

ectool getCIJob 'CI Build Demo' 'build-with-params'

getCIJobs

Gets CI jobs for the specified CI configuration.

Arguments Descriptions

ciConfigurationName

The name of the CI Configuration. Argument Type: String

folder

(Optional)Path to the folder on the CI server referenced by ciConfigurationName that contains the specified CI job. Must be in format folder1/folder2/folder3/…​.

If not specified, the root level for ciConfigurationName is used.

jobSearchType

(Optional) Specify job search type:

  • FOLDER to return all folders

  • JOB to return all other job types

  • ALL to return both jobs and folders

If not specified, JOB is used.

Argument Type: String

Positional arguments

ciConfigurationName

Response

Returns one or more ciJob objects.

ec-perl

syntax: $cmdr->getCIJobs (<ciConfigurationName>, {<optionals>});

Example

$cmdr->getCIJobs
  (
    ciConfigurationName => "CI Build Demo"
  );

ectool

syntax: ectool getCIJobs <ciConfigurationName> [optionals]

Example

ectool getCIJobs 'CI Build Demo'

getCIJobParameters

Retrieve parameters for the given CloudBeesCI job. See This list for the types of parameters.

Arguments Description

ciConfigurationName

The name of the CI Configuration. Argument Type: String

ciJobName

The name of the CI Job as returned from the getCIJobs command. Argument Type: String

folder

(Optional)Path to the folder on the CI server referenced by ciConfigurationName that contains the specified CI job. Must be in format folder1/folder2/folder3/…​.

If not specified, the root level for ciConfigurationname is used.

Positional arguments

ciConfigurationName, ciJobName

Response

Returns the parameters for the specified ciJobName as a string.

Parameter types

Unresolved include directive in modules/flow-api/pages/apicijobs.adoc - include::cloudbees-cd::partial$user-guide/ciParameterTypes.adoc[]

ec-perl

syntax: $cmdr->getCIJobParameters (<ciConfigurationName>, {<ciJobName});

Example

$cmdr->getCIJobParameters
  (
    getCIJobParameters => {"CI Build Demo","job-with-params"}
  );

ectool

syntax: ectool getCIJobParameters <ciConfigurationName> [optionals]

Example

ectool getCIJobParameters 'CI Build Demo'