I have a question around SFDX source deploy to non-scratch org, with destructive changes using CI/CD pipeline:
## Authenticate with your playground or sandbox environment $ sfdx force:auth:jwt:grant -i $CONSUMER_KEY -f assets/server.key -r $SF_TARGET_URL -u $USERNAME -a TARGETOrg ## Deploy source to sandbox org (This is with source code, all files, etc) $ sfdx force:source:deploy -l $TESTLEVEL -g -u TARGETOrg -w 180 -x ./manifest/package.xml
force:source:deploy does not consider destructive changes so delete metadata.
I can use:
$ sfdx force:source:delete -g -u TARGETOrg -m ./manifest/destructivechanges.xml
$ sfdx force:source:delete -g -u TARGETOrg -m ./manifest/destructiveChangesPre.xml
before and after
force:source:deploy. But these would be three different transactions. If something goes wrong in the deploy command, the next statement won't execute. This is something which is not correct.
I don't want to do
mdapi commands to deploy. How is this possible using