Deploys metadata in source format to an org.
It executes the force:source:deploy command.
In addition to the attributes used by every ant-sfdx task, this task uses the following attributes:
Attribute | Command line equivalent | Description | Required |
---|---|---|---|
checkonly | -c | When set to true, validates the deployed metadata and runs all Apex tests but prevents the deployment from being saved to the org. |
No; defaults to false. |
ignoreerrors | -o | When set to true, ignores the deploy errors, and continues with the deploy operation. |
No; defaults to false. |
ignorewarnings | -g | When set to true, the success field in DeployMessage is true even if a warning occurs. When set to falseand a warning occurs success is set to false, and the warning is treated like an error. |
No; defaults to false. |
manifest | -x | The path for the manifest (package.xml) file that specifies the components to deploy. | No. |
sourcepath | -p | The path to the local source file (or directory) to deploy. | No |
targetusername | -u | A username or alias for the target org. | No |
testlevel | -l | Specifies which tests to run. Acceptable values are:
|
No |
validateddeployrequestid | -q | Specifies the ID of a package with recently validated components to run a Quick Deploy. | No. |
wait | -w | The streaming client socket timeout, in minutes. | No; defaults to 33. |
Specifies the name of a metadata component to deploy to the org.
The sourcepath attribute is a path-like structure and can also be set via a nested <sourcepath>
element.
Specifies an Apex test class name to run.
<sfdx:force-source-deploy targetusername="scratchorg" sourcepath="force-app/main/default/objects/Case"> <sourcepath> <pathelement location="force-app/main/default/objects/Contact" /> <dirset dir="force-app/main/default/objects"> <include name="Ac*" /> </dirset> </sourcepath> </sfdx:force-source-deploy>
Version: 0.0.0-master