New addDefaultJob option to createPlan

Description

Description

Automatically adds a default stage and job to the plan similar to creating a plan from the UI which currently uses:

  • Default Stage

  • Default Job with key JOB1

This option provides and higher performance way to create plans especially if want to use job with key JOB1 in your plan script. We recommend using this option where possible and the default names work. If you need to customize the default stage that is added, use updateStage after the createPlan. The job key (JOB1) cannot be changed.

Note that the default job does not have the clone task that normally is created with the default job from the UI when there is a default repository associated with the plan. This is good as it means you have control over this.

IF you want the clone task, you can either use the repository parameter on createPlan (see ) or you can add the clone task simply as follows after creating the plan and adding the repository:

Example - Specifying the Option

Environment

None

Status

Assignee

Bob Swift [Bob Swift Atlassian Apps]

Reporter

Bob Swift [Bob Swift Atlassian Apps]

Labels

None

Support Entitlement

None

Fix versions

Priority

Major
Configure