project-deploy-start Task

Description

Deploy metadata to an org from your local project..

It executes the project deploy start command.

Parameters

In addition to the attributes used by every ant-sf task, this task uses the following attributes:

Attribute Command line equivalent Description Required
dryrun --dry-run 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.
ignoreconflicts --ignore-conflicts When set to true, ignore conflicts and deploy local files, even if they overwrite changes in the org. No; defaults to false.
ignoreerrors --ignore-errors When set to true, ignore conflicts and deploy local files, even if they overwrite changes in the org. No; defaults to false.
ignorewarnings --ignore-warnings When set to true, the success field in DeployMessage is true even if a warning occurs. When set to false and a warning occurs success is set to false, and the warning is treated like an error. No; defaults to false.
manifest --manifest The path for the manifest (package.xml) file that specifies the components to deploy. No.
metadatadir --metadata-dir Root of directory or zip file of metadata formatted files to deploy. No
purgeondelete --purge-on-delete When set to true, specifies that deleted components in the destructive changes manifest file are immediately eligible for deletion rather than being stored in the Recycle Bin. No; defaults to false.
postdestructivechanges --post-destructive-changes Path for a manifest (destructiveChangesPost.xml) of components to delete after the deploy. No
predestructivechanges --pre-destructive-changes Path for a manifest (destructiveChangesPre.xml) of components to delete before the deploy. No
singlepackage --single-package When set to true, indicates that the metadata zip file points to a directory structure for a single package. No; defaults to false.
sourcedir --source-dir The path to the local source file (or directory) to deploy. No
targetorg --target-org A username or alias for the target org. No
testlevel --test-level Specifies which tests to run. Acceptable values are:
  • RunAllTestsInOrg: all tests in your org and in installed managed packages are run.
  • RunLocalTests: all tests in your org are run, except the ones that originate from installed managed packages.
  • RunSpecifiedTests: only the tests that you specify are run.
No
wait --wait Number of minutes to wait for command to complete and display results. No; defaults to 33.

Parameters specified as nested elements

metadata

Specifies the name of a metadata component to deploy to the org.

metadatadir

The metadatadir attribute is a path-like structure and can also be set via a nested <metadatadir> element.

sourcedir

The sourcedir attribute is a path-like structure and can also be set via a nested <sourcedir> element.

tests

Apex tests to run when testlevel is RunSpecifiedTests.

Examples

<sf:project-deploy-start targetusername="scratchorg" sourcedir="force-app/main/default/objects/Case">
  <sourcedir>
    <pathelement location="force-app/main/default/objects/Contact" />
    <dirset dir="force-app/main/default/objects">
      <include name="Ac*" />
    </dirset>
  </sourcedir>
</sf:project-deploy-start>

Version: 0.0.0-master