Question 1
Choose 1
Universal Containers (UC) currently uses the org development model and utilizes the Salesforce CLI as the
deployment tool. After the feature release artifact file has been tested in a lower sandbox, it is being deployed
to the full sandbox for performance testing and production deployment readiness check.
Since quick deployment options are not being used, what is the correct way to deploy the artifact to the full
sandbox?
Correct answer:
B. Authorize to the Full sandbox org; Validate with sfdx:mdapi:deploy On successful validation, deploy
with sfdx:mdapi:deploy
Explanation
The key phrase in the question is: "the feature release artifact file has been tested." This tells us the deployment is using a release artifact — a single, pre-built metadata package (a `.zip` file), not source-format files.
The Metadata API (`mdapi`) commands work with metadata format (zip files). The Source (`source`) commands work with source format (individual files/directories). Since UC is deploying a release artifact (a packaged zip), the correct commands are the `mdapi` variants.
Why Other Options Are Incorrect
A. Authorize; Validate with `sfdx:source:deploy`; Deploy with `sfdx:mdapi:deploy` — This mixes command types. `source:deploy` works with source format, but the artifact is a metadata zip. You can't validate source format and then deploy metadata format for the same artifact — the formats don't match. Inconsistent and incorrect.
C. Authorize; Validate with `sfdx:source:deploy`; Deploy with `sfdx:source:deploy` — This uses `source:deploy` for both steps, which is for source-format deployments, not for a release artifact zip. Since the artifact is metadata format, `source:deploy` is the wrong command.
D. Authorize; Validate with `sfdx:mdapi:deploy`; Deploy with `sfdx:source:deploy` — This validates with the right command (`mdapi:deploy`) but then deploys with the wrong one (`source:deploy`). Again, a format mismatch — you can't validate a metadata zip and then deploy it as source format.
References
* Salesforce CLI Command Reference – `sfdx force:mdapi:deploy`: Deploy/validate metadata-format (zip) artifacts; `--checkOnly` for validation-only.
* Salesforce CLI Command Reference – `sfdx force:source:deploy`: Deploy source-format files/directories.
The key phrase in the question is: "the feature release artifact file has been tested." This tells us the deployment is using a release artifact — a single, pre-built metadata package (a `.zip` file), not source-format files.
The Metadata API (`mdapi`) commands work with metadata format (zip files). The Source (`source`) commands work with source format (individual files/directories). Since UC is deploying a release artifact (a packaged zip), the correct commands are the `mdapi` variants.
Why Other Options Are Incorrect
A. Authorize; Validate with `sfdx:source:deploy`; Deploy with `sfdx:mdapi:deploy` — This mixes command types. `source:deploy` works with source format, but the artifact is a metadata zip. You can't validate source format and then deploy metadata format for the same artifact — the formats don't match. Inconsistent and incorrect.
C. Authorize; Validate with `sfdx:source:deploy`; Deploy with `sfdx:source:deploy` — This uses `source:deploy` for both steps, which is for source-format deployments, not for a release artifact zip. Since the artifact is metadata format, `source:deploy` is the wrong command.
D. Authorize; Validate with `sfdx:mdapi:deploy`; Deploy with `sfdx:source:deploy` — This validates with the right command (`mdapi:deploy`) but then deploys with the wrong one (`source:deploy`). Again, a format mismatch — you can't validate a metadata zip and then deploy it as source format.
References
* Salesforce CLI Command Reference – `sfdx force:mdapi:deploy`: Deploy/validate metadata-format (zip) artifacts; `--checkOnly` for validation-only.
* Salesforce CLI Command Reference – `sfdx force:source:deploy`: Deploy source-format files/directories.
