Skip to main content

Troubleshooting CI Jobs & Pipeline Deployment

Documentation on how to troubleshoot pipeline deployment & CI job issues

Written by Chris Mead

How can this article help?

While deploying via Gearset pipelines, some users encounter issues with their CI job not deploying metadata as they expect. Typically, this is caused by a couple of common configuration issues with the users CI job.

In our experience, almost all of the reasons a CI job would not deploy metadata are covered in this guide. If you find that your CI job hasn't deployed metadata as you expect, we would recommend checking the steps in this guide in order.

Steps to troubleshoot your CI job deployment issues

Question 1 - Is the webhook set up for the CI job?

​Question 2 - Is the component included in the metadata filter?

Question 3 - Has the problem analyzers stripped the component out?

Question 4 - Has the component made it into the deployment package zip file?

​Question 5 - Is the component you're deploying referenced in the .forceignore / .gitignore file?

​Question 6 - Is it the user permissions that aren't getting deployed to the org?
Question 7 - Are you deploying permissions through CI jobs that could have different states on the source and target?

​​Other error(s) you may be experiencing in your CI jobs

What to do if you want to deploy the (missing) components to the target environment of your CI job?

Once a PR has been merged, you may need to manually deploy to the org because the changes you were trying to deploy are already present on the environment branch.

The quickest way to do this is to use the manual deployment process (by which we mean Compare and deploy) to deploy the items that have not been deployed in the CI job.

Gearset will allow you to unselect the problem analyzer(s) on the dedicated problem analyzers page - which usually gets displayed on the pre-deployment summary page after you've selected your items for deployment and clicked on Next.

Note: Skipping our suggested problem analyzers may result in a validation failure or a deployment error.

After all, the purpose of the problem analyzer(s) is to increase the chances of your successful validation/deployment in the first place.

If a validation or deployment errors happen, you'll need to address the Salesforce errors in order to deploy successfully.

Our dedicated Salesforce validation errors page may help you tackle some of the most commonly seen errors that we've documented.

And if you don't want to deploy the specific changes to the target of the CI job

You can also choose to not deploy specific items into the target.

To remove an item from being included in future CI job runs, you'd need to edit the metadata filter in the CI job setting to exclude those components from showing up in the deployment package the future CI job runs.

What if these questions haven't helped?

We believe that above guidance will help you with identifying at which stage the problem has occurred and what you can do.

However, if you come into a scenario that we haven't covered in our troubleshooting steps or they haven't helped - please reach out to us in the in-app, as we'd like to hear about it!

Did this answer your question?