project deploy quick
Quickly deploy a validated deployment to an org.
Before you run this command, first create a validated deployment with the “sf project deploy validate” command, which returns a job ID. Validated deployments haven’t been deployed to the org yet; you deploy them with this command. Either pass the job ID to this command or use the –use-most-recent flag to use the job ID of the most recently validated deployment. For the quick deploy to succeed, the associated validated deployment must also have succeeded.
Executing this quick deploy command takes less time than a standard deploy because it skips running Apex tests. These tests were previously run as part of the validation. Validating first and then running a quick deploy is useful if the deployment to your production org take several hours and you don’t want to risk a failed deploy.
This command doesn’t support source-tracking. The source you deploy overwrites the corresponding metadata in your org. This command doesn’t attempt to merge your source with the versions in your org.
Note: Don’t use this command on sandboxes; the command is intended to be used on production orgs. By default, sandboxes don’t run tests during a deploy. Use “sf project deploy start” instead.
deploy:metadata:quick
| Flag Name (Long) | Flag Name (Short) | Description |
|---|---|---|
‑‑api‑version | ‑a | Type: Value Target API version for the deploy. Use this flag to override the default API version with the API version of your package.xml file. The default API version is the latest version supported by the CLI. |
‑‑async | N/A | Type: Boolean Run the command asynchronously. The command immediately returns the control of the terminal to you. This way, you can continue to use the CLI. To resume watching the deploy, run “sf project deploy resume”. To check the status of the deploy, run “sf project deploy report”. |
‑‑concise | N/A | Type: Boolean Show concise output of the deploy result. |
‑‑flags‑dir | N/A | Type: Value Import flag values from a directory. |
‑‑job‑id | ‑i | Type: Value Job ID of the deployment you want to quick deploy. The job ID is valid for 10 days from when you started the validation. |
‑‑json | N/A | Type: Boolean Format output as json. |
‑‑target‑org | ‑o | Type: Value Username or alias of the target org. |
‑‑use‑most‑recent | ‑r | Type: Boolean Use the job ID of the most recently validated deployment. For performance reasons, this flag uses only job IDs that were validated in the past 3 days or less. If your most recent deployment validation was more than 3 days ago, this flag won’t find a job ID. |
‑‑verbose | N/A | Type: Boolean Show verbose output of the deploy result. |
‑‑wait | ‑w | Type: Value Default value: 33 minutesNumber of minutes to wait for the command to complete and display results. If the command continues to run after the wait period, the CLI returns control of the terminal window to you. To resume watching the deploy, run “sf project deploy resume”. To check the status of the deploy, run “sf project deploy report”. |
Run a quick deploy to your default org using a job ID:
Asynchronously run a quick deploy of the most recently validated deployment to an org with alias “my-prod-org”: