Skip to main content

How to add a static environment into your pipeline

A step-by-step guide on how to create your first static environment using our setup wizard.

Josh Camilleri avatar
Written by Josh Camilleri
Updated over a week ago

This article will outline the steps needed to create a new static environment from your pipelines homepage. Once you have created your pipeline (Creating your first Pipeline using the setup wizard). Click on Create Environment as seen below.

If you already have a static environment set up already you'll need to navigate to the Add in the top left and select Add static environment.

Next Gearset will ask if you are using an existing CI job or wanting to set up a new CI job.

Linking an existing CI job

You can select to use an existing CI Job to start your pipeline. In that case you will be able to select which of the CI Jobs you want to use, click save and that will add it into your pipeline.

If you are creating a new environment then follow the steps below.

Creating a new CI job

  1. Basic Configuration

Job Name - Give the job a descriptive name.

Source type - Select your Git provider, Repository and branch as required.

Decide whether to filter the comparison by package.xml.

Select the target org as required.

2. Deployment Behavior

Select either Deployment or Validation action.

  • Validation-only CI jobs - This will run a validation of the package against the chosen org. Then you are able to deploy the package at a later date.

Select either Delta CI or if you would like to run a full sync between source and target.

Choose how often you want the job to run. Either select when the branch is updated (recommended), or select a time interval.

  • Note: If you choose 24 hours as the runtime, the first automated run will be sometime in the next 4-hour period. The job will then be scheduled to run between midnight and 4 am UTC.

Select if you would like to validate PRs against the source branch.

  • Any PRs that you open against the source branch will then be validated against the org, so that you know that you are able to merge and deploy.

Next you also have an option to send a notification each time a pull request is validated. The notification is sent based on your set-up for your notification settings (via email, slack, chatter, etc.)

Select if you would like the job to include New items, Changed items, and Deleted items.

Decide if you want to include changes to user permissions in your CI job; by default, these are excluded.

3. Metadata Filters

On the Metadata filter tab, set the metadata filter you'd like the job to use. This defines which metadata types the CI job will compare and deploy between your source and target.

4. Testing

Specify the unit test level you would like for the CI job.

You can select to trigger the Agentforce testing center to trigger on a successful deployment.

You can select if Automated UI tests will be triggered after a successful deployment and the provider. The results will be shown in Gearset on the CI Jobs page.

5. Outgoing Webhooks

6. Deployment Gates

Specify any Deployment gates that you wish to include. In CI jobs this is done by selecting a Static code analysis ruleset if the CI job fails on those rules then the job will not validate.

7. Advanced Settings

Here you can select the Problem Analyzer templates that are used in each run, or you can choose to not apply any fixes to skip problem analysis.

8. Notifications

Choose whether to get notified after every CI job run, irrespective of the outcome, or only if the CI job fails, and select how you'd like to be notified.

Click Save CI Job.

Congratulations! You have set up your first static environment in your pipeline!

Did this answer your question?