Behavior

Is your continuous integration (CI) job not deploying an item you expect it to?
Is your CI job showing changes that repeatedly do not get deployed to the target?

If so, then it's possible that a problem analyzer is removing items from the deployment of your CI job run. This article will help you check to see if this is the case and then explain what you can do.

Explanation

When you run a manual compare and deploy, after the items to deploy are selected and before the deployment package is created, the problem analyzers kick in. Problem analyzers are Gearset suggestions for your deployment package, to add or remove any other components that help make your deployment more likely to succeed. You can choose to tick or un-tick any of these suggestions in order to modify your package.

In a CI job scenario, since it is an automated process, all the suggestions are automatically ticked (which may add or remove components to the package). It will then proceed with the deployment. This is the most common reason that items are not deployed in a CI job. 

If you would like to verify that the problem analyzer is the reason that your item is not being deployed via the CI job, you can run a manual comparison with the same source and target, using the same metadata filter, and click through to see the problem analyzers being triggered. 

Resolution

If you want to deploy the changes to the target

The quickest way to do this is to use the manual deployment process to deploy the items that have not been deployed in the CI job, and un-tick the problem analyzer after reading the reason for it. Note that this may result in a deployment error/failure, as that is after all the purpose of the problem analyzer in the first place. You may need to address the Salesforce deployment errors in order to deploy successfully.

If you don't want to deploy the changes to the target

You can also choose to not deploy specific items into the target. To remove an item from being included in future job runs, you may edit the metadata filter in the CI job setting to exclude those components from showing up in future.

If you have any questions about this process, please don't hesitate to ask us in the in-app chat!

Did this answer your question?