Skip to main content

Custom metadata filters in CI Jobs

Guidance on how to create and save a metadata filter for a CI job

Ryan Quinn avatar
Written by Ryan Quinn
Updated today

How are custom metadata filters used in CI jobs?

In a CI job, as changes are committed to the source or the job runs a full sync, the metadata filter acts as a gatekeeper, ensuring only the specified metadata types are deployed to the target environment.
​
As a best practice for managing your Gearset Pipeline deployments tied to a single repository, establish a custom metadata filter containing the metadata types your team typically deploys. Utilize this saved filter across all related CI jobs for consistency.

Note: Only in rare instances should CI jobs in a pipeline utilize different metadata filters.

Where can I update my CI job filter?
​

On the CI dashboard page:

  1. Click on the CI job and select Edit settings

  2. Navigate to the Metadata filters tab where you can make changes to the filter (adding or removing metadata types)

  3. Click the Save filter... icon where you'll be prompted to either "Save your changes as a new filter", or "Update the filter with any changes you have made"

  4. Tick the checkbox to confirm that you understand the filter amendment will update all the CI jobs that are using this metadata filter.

  5. Click Save filter and then Save CI job to apply.


​Or directly from Compare and deploy page:

  1. Click the dropdown under COMPARISON FILTER

  2. Select Manage custom filters tab

  3. Next, follow the above steps from points 2 to 5.

Once the filter is updated, the CI job(s) will now use your updated filter for all future runs.

Video Demonstration

Below is a short demo of amending an existing custom filter used in several CI jobs from CI dashboard page:
​

Note: When you edit an existing named filter, any changes that you make to the filter will apply in all the places where the filter is used (e.g. across all the CI jobs that use the filter).

Did this answer your question?