4

SFDX project folder structure is little different from previous folder structure where all metadata folders are inside src folder.

ANT agent on our Continuous Integration tool works for the old folder structure. How can I make the agent work for the new folder structure?

1) Convert SFDX to src folder structure and commit to VCS

2) Update CI script to read SFDX project and deploy to sandboxes(dev, uat, prod etc)

Any examples to the recommended approach is appreciated. Thanks!

5

At very high level here are the steps you need to take to convert the existing source format to the DX source format .

1.Replace your ANT Migration tooling to leverage SalesforceDX CLI .Assuming your CI is a unix server you can run below to install

wget https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz

mkdir sfdx

tar xJf sfdx-linux-amd64.tar.xz -C sfdx --strip-components 1

./sfdx/install

or If you have node(Ensure that Node v8.6.0 or later is installed on your computer) and npm installed on the CI server use below

npm install sfdx-cli --global
  1. Convert your existing project source code to the DX Source format using the technique described here

3.The source in your SVN will be of DX format .Use the metadata convert command to convert the source to metadata format that you can deploy

sfdx force:source:convert -r path/to/source -d path/to/outputdir

4.Authenticate to the org where you want to deploy using the sfdx auth command

You can use any approach mentioned in the doc other than web login to authenticate your CI server

4.Deploy the source using mdapi deploy command

sfdx force:mdapi:deploy -u <alias> -w 10 -d path/of/outputdir
1

As of v45 of the Salesforce CLI The source:deploy Command enables you to directly deploy to non-scratch orgs of your chosing. This means, you no longoer need to convert the data from an SFDX friendly format to one supported by the MDAPI.

Deploys source to a non-source-tracked org, such as a sandbox.

The Feature is in Beta, however, functional.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.