You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When running sf cli in Github actions, I would like sf project deploy validate --json to return a more easily machine readable deploymentId, so I can run further processing (e.g. sf project deploy report) on it in GHA failure steps.
What are you trying to do
My developers use github actions as our CI/CD system for Salesforce. We are trying to run a deployment validation on PR sync, and then a quick deploy on merge to main to reduce our github billable time. We want to run sf project deploy validate and capture the deployment Id from the result in a machine-readable format (json).
This works fine when the validation is a success, as the json output includes a clear Id property that we can use for further processing. But when the validation is not successful, the format of the json is as follows:
{
"code": 1,
"context": "DeployMetadataValidate",
"commandName": "DeployMetadataValidate",
"message": "Failed to validate the deployment (0Af1n00001if15hCAA). Due To:\nAverage test coverage across all Apex Classes and Triggers is 52%, at least 75% test coverage is required.",
"name": "FailedValidationError",
"status": 1,
"stack": "FailedValidationError: Failed to validate the deployment (0Af1n00001if15hCAA).....[redacted[",
"exitCode": 1,
"warnings": []
}
meaning that if I want to follow up with a failure step to retrieve a sf project deploy report in a different format, I can only grab the deployment Id from the message property, which is subject to changes in formatting.
Describe the solution you'd like When I run sf project deploy validate with the --json flag and the validation fails I want the output json object to contain a stably named property (id or deploymentId) So that I can read that property from the json object reliably and use it for further processing
Describe alternatives you've considered
Right now we are reading the deployment Id from the message property, but this is a string error message whose format has changed through the years, so it's not massively reliable.
The text was updated successfully, but these errors were encountered:
Thank you for filing this feature request. We appreciate your feedback and will review the feature at our next grooming or sprint planning session. We prioritize feature requests with more upvotes and comments.
Is your feature request related to a problem? Please describe.
When running sf cli in Github actions, I would like
sf project deploy validate --json
to return a more easily machine readable deploymentId, so I can run further processing (e.g.sf project deploy report
) on it in GHA failure steps.What are you trying to do
My developers use github actions as our CI/CD system for Salesforce. We are trying to run a deployment validation on PR sync, and then a quick deploy on merge to main to reduce our github billable time. We want to run
sf project deploy validate
and capture the deployment Id from the result in a machine-readable format (json).This works fine when the validation is a success, as the json output includes a clear
Id
property that we can use for further processing. But when the validation is not successful, the format of the json is as follows:meaning that if I want to follow up with a failure step to retrieve a
sf project deploy report
in a different format, I can only grab the deployment Id from themessage
property, which is subject to changes in formatting.Describe the solution you'd like
When I run
sf project deploy validate
with the--json
flag and the validation failsI want the output json object to contain a stably named property (id or deploymentId)
So that I can read that property from the json object reliably and use it for further processing
Describe alternatives you've considered
Right now we are reading the deployment Id from the
message
property, but this is a string error message whose format has changed through the years, so it's not massively reliable.The text was updated successfully, but these errors were encountered: