Hierarchy

  • DeployOptions

Properties

allowMissingFiles?: boolean

If files that are specified in package.xml are not in the .zip file, specifies whether a deployment can still succeed.

Do not set this argument for deployment to production orgs.

autoUpdatePackage?: boolean

If a file is in the .zip file but not specified in package.xml, specifies whether the file is automatically added to the package.

A retrieve() is issued with the updated package.xml that includes the .zip file.

checkOnly?: boolean

Defaults to false. Set to true to perform a test deployment (validation) of components without saving the components in the target org.

A validation enables you to verify the results of tests that would be generated in a deployment, but doesn’t commit any changes. After a validation finishes with passing tests, sometimes it can qualify for deployment without rerunning tests

Default

false
ignoreWarnings?: boolean

Indicates whether deployments with warnings complete successfully (true) or not (false).

The DeployMessage object for a warning contains the following values:

  • problemType—Warning
  • problem—The text of the warning

If a warning occurs and ignoreWarnings is set to true, the success field in DeployMessage is true.

If ignoreWarnings is set to false, success is set to false and the warning is treated like an error.

Default

false
performRetrieve?: boolean

Indicates whether a retrieve() call is performed immediately after the deployment (true) or not (false). Set to true to retrieve whatever was just deployed.

purgeOnDelete?: boolean

If true, the deleted components in the destructiveChanges.xml manifest file aren't stored in the Recycle Bin. Instead, they become immediately eligible for deletion.

This option only works in Developer Edition or sandbox orgs. It doesn’t work in production orgs.

rollbackOnError?: boolean

Indicates whether any failure causes a complete rollback (true) or not (false). If false, whatever actions can be performed without errors are performed, and errors are returned for the remaining actions.

This parameter must be set to true if you are deploying to a production org.

Default

false
runAllTests?: boolean

Deprecated

Only available in API version 33.0 and earlier.

runTests?: string[]

A list of Apex tests to run during deployment. Specify the class name, one name per instance. The class name can also specify a namespace with a dot notation.

To use this option, set testLevel to RunSpecifiedTests.

singlePackage?: boolean

Indicates whether the specified .zip file points to a directory structure with a single package (true) or a set of packages (false).

testLevel?: "NoTestRun" | "RunSpecifiedTests" | "RunLocalTests" | "RunAllTestsInOrg"

Optional. Specifies which tests are run as part of a deployment. The test level is enforced regardless of the types of components that are present in the deployment package.

If you don’t specify a test level, the default test execution behavior is used

Note: Apex tests that run as part of a deployment always run synchronously and serially.