Skip to main content
Problem analyzer templates

How to create problem analyzer templates and assign them to CI jobs

Dario Messina avatar
Written by Dario Messina
Updated over 4 months ago

Gearset's problem analyzers are designed to make your deployments more likely to succeed by providing suggestions, either to remove or add items in your deployment package.

For manual comparisons made via Compare and deploy - during a deployment you have the option to ignore some of the suggestions made by Gearset's Problem analyzers, and there's a chance that the deployment will still be successful. You might want to do this, for example, if you are deploying metadata changes to a source control repository.

For every continuous integration (CI) job you can select:

  • Apply all fixes - this applies all Gearset's Problem analyzers to be run;

  • A custom Problem Analyzer template - in which you can select which problem analyzers to run;

  • Don't apply any fixes - which leaves the package exactly as is and applies no Problem analyzers to the CI job.

The chosen Problem analyzers option will run on every CI job run.

License requirements for Problem analyzer templates

With the Automation Platform license you can create problem analyzer templates and assign them to your CI jobs.

These templates allow you to configure which problems are identified by Gearset's problem analyzers, and whether the related fixes should be applied to your metadata changes prior to deployment.

Note that this may result in a deployment error/failure, as the purpose of the problem analyzer is to make it more likely to succeed. You may need to address the Salesforce deployment errors in order to deploy successfully. Even though, in some cases, the deployment can still be successful.

Creating a new template

To create a new template, navigate to the Problem analyzer templates section in My Account and click Create new template.

Here you will find the list of problem analyzers that can be enabled/disabled.

By default, you'll see all problem analyzers enabled.

Once you disable the ones that you do not want to be applied, and give the template a name, you can go ahead and save the template.

Cloning an existing template

To create a new problem analyzer template, you must uncheck all the analyzers you don't want to have in the template. With up to 45 (currently) analyzers to uncheck, this can be a bit tedious if a user wants to copy settings from a similar template.

If that's you, be aware that you can clone an existing template to create a new one, but starting from a pre-selected selections of problem analysis from an existing template, that you can then modify as needed.

To do so, chose the template from your team's saved templates, then click Clone this template.

Next make your selections, give the new template a name, and hit Save template.

Assigning the template to a CI job

Once a templated is saved, you can change the assigned problem analysis template on the settings of every CI job you need to have it applied to.

If you click on the link in blue, you'll be redirected to the CI jobs dashboard where all your CI jobs are visible.

Click Edit settings on the CI job, then go to Advanced on the menu (left hand side), choose your newly created template from the drop menu list, and finally press Save.

Note: If you're already in the settings for a CI job in another tab when the new template is created, you would need to refresh the CI job settings tab for it to pick up the new template.

In the CI job configuration form, go to the tab Advanced settings. Select the template that you just created and press Save.

Now your CI job, as well as its validation-only child CI jobs, will only have the problem analysis fixes applied that are enabled as part of the template.

If you do not wish for a template to be assigned to a CI job anymore, you can change this option back to one of the default choices of Apply all fixes or Don't apply any fixes.

Deleting a template

Going back to the Problem analyzer templates section, you can also delete an existing template by pressing the red bin icon that shows once you select the template. Please note that before doing this you will need to make sure the template is not currently assigned to any CI jobs.

Did this answer your question?