setJobName

Back to index

Summary

Sets the name of a running job.
  • You must specify jobId and newName.

  • The jobId can be omitted if the command is run as part of a CloudBees CD/RO step.

  • A job cannot be renamed after it has completed.

jobId
Stringrequired
The primary key of the job, or the name of the job.
newName
Stringrequired
The new name for the job.

Usage

Perl

$cmdr->setJobName( "test-jobId", # jobId "test-newName" # newName );

ectool

ectool setJobName \ "test-jobId" `# jobId` \ "test-newName" `# newName`

Examples

Perl

$cmdr->setJobName(4fa765dd-73f1-11e3-b67e-b0a420524153, "Delay Test_541"); (from the command line) $cmdr->setJobName("TestJob_252"); (from a step command)

ectool

ectool setJobName 4fa765dd-73f1-11e3-b67e-b0a420524153 "Delay Test"_541 (from the command line) ectool setJobName "TestJob"_252