[SalesForce] Salesforce Continuous Integration : Only components in the same namespace as the organization can be created through the API

I have a Salesforce CI newbie issue. I'm trying to build a CI pipeline for Salesforce using Bitbucket / Jenkins and the Salesforce Migration tool. I'm trying to prototype the pipeline against a dev org using a source dump from sandbox which contains a number of licensed packages ( many of which are integrated into standard objects such as Account ). I'm encountering ( understandably enough ) the following error –
"Only components in the same namespace as the organization can be created through the API"
Is there a best practice to deal with issues such as this ? Do I need to download and deploy all licensed managed packages ?

Best Answer

You have to either remove the managed package items, or install the managed packages. You can use InstalledPackage to help automate the process if you want to go down the path of installing dependencies, or you can install them manually; Developer Edition orgs, like Sandbox orgs, can install any package and get an unlimited Site license for evaluation purposes. If installing is not suitable for your purposes, you'll want to come up with a way to strip any references to those packages from your code and metadata, which may be easier said than done.

Related Topic