I've recently started working on a rather insane project which has had a lot of organic growth over the years and includes over 20 deeply integrated managed packages.

We are currently trying to tame our processes and wish to get some CI/CD going and expect SFDX will play a key role in our solution.

In order for our developers and Jenkins (or maybe Travis) to be able to create scratch orgs which correctly, appropriately, or at least adequately mimic our production environment, I expect we will need to include many features and/or preferences/settings within our config file (or at least in some config files, if it turns out we need multiple files).

Is there any tool/method to automate discovery of which features/settings/preferences.

  • Are you talking about Metadata? or full configration parameters of a all org? – Carlos Naranjo Nov 29 '18 at 11:29
  • I'm talking about the .json config file which can used to configure scratch orgs when they are created, before metadata gets loaded into the org. – Brian Kessler Nov 29 '18 at 12:21

There's a pilot feature called Org Shape, but I don't think you'll be able to get on to it at this point. It should probably become a beta feature sometime in 2019 (but does not appear to be part of Winter 19 at this point). For now, the only method of discovery is trial-and-error, or you can try building a normal package and clicking on the "View Dependencies" button, which should give you a list of features that the package would depend on if uploaded.

  • Using sfdx force:mdapi:deploy, I get more errors than my console buffer will hold.... (Yes, I am trying to deploy with unconverted metadata... if we can.) What would be the recommended way to build the package? Where would I click "View Dependencies"? Thanks! – Brian Kessler Nov 29 '18 at 15:13
  • 1
    @BrianKessler In your org where you're getting the metadata from, click on Setup > Create > Packages, create a new package, click Add to add all the metadata you want to check. On the Package Detail page, you'll see the View Dependencies button. – sfdcfox Nov 29 '18 at 15:16
  • Would I be correct in believing that the only way I could have 100% confidence in "View Dependencies" being 100% complete and correct would be to manully go through every component type and select all before clinging "View Dependencies"? Is there an efficient way to select all of all component types? – Brian Kessler Nov 29 '18 at 15:32
  • 1
    @BrianKessler if you already did a retrieve, like from the force.com IDE, just copy all the files to a new folder, edit the package.xml to include a fullName attribute, and deploy back to the org. This fullName attribute will cause Salesforce to create/update a package with all the contents in the file. – sfdcfox Nov 29 '18 at 15:43

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.