Different teams work with pipelines in a variety of ways, particularly when it comes to releasing changes into Production. Some teams push changes through feature by feature all the way to Production, releasing on demand, while others release on a set cadence (e.g. every one or two weeks), or bundle features together to release in blocks.
For cadence-based releases, we now provide the ability to merge multiple features into a release branch, which can be checked for merge conflicts, validated and then promoted into Production. This article describes how this process works.
Note: As best practice, it's recommended to manage and promote releases in Gearset rather than in your version control system.
If you prefer to jump straight into a specific section within the article, feel free to use the links on the right!
Branching Strategy with Releases
When utilizing Releases in Pipelines, the branching strategy behind it changes somewhat to incorporate a release branch concept used to optionally bundle features together.
The diagram below shows how a release branch is carved out of your main branch (when following the rest of this guide), and how features can then be merged into it - which provides continuous validation against your Production org, and the ability to merge it into Main and deploy to Production when ready.
Release Branch Creation
Release branches can only be created on the final environment in a pipeline.
The ability to create release branches on earlier environments in your pipeline is coming soon - if you are interested in this functionality or have any questions, please contact us!
In the pipelines UI, the final environment differs from other environments in two ways:
The
Releasestab shows any release PRs created that target that final environment.Users have the option, after selecting open PR features, to create a release PR with those feature PRs merged into it.
To create a release, select at least one open feature from the Open pull requests tab and click Create release...:
On the subsequent pop-up window, enter the release PR name for this release. Optionally, you can schedule the deployment of this release on creation - this allows you to deploy releases at whatever cadence you require.
β
You can specify a default release PR naming scheme for a pipeline by navigating to that pipeline's settings (Settings cog -> Edit pipeline settings), and by going to the Releases tab.
Once you click Merge into release, Gearset will create a new release branch from the base branch configured for that pipeline (usually the main or master branch). We then merge the selected feature pull requests into that new branch, close those feature PRs, and open a new pull request from the release branch to the target environment branch. The release PR created will have a name corresponding to the name specified when creating the release in Gearset.
β
The release will be created so long as at least one feature could be added successfully. Any features which were unable to be added to the release (due to conflicts) will need to be manually resolved and merged into the release. For more information see [the below section on merging features into releases](https://docs.gearset.com/en/articles/6963012-releases-in-pipelines#h_a4baafb89b)
β
The Releases tab shows information about all the changes included in the release, as well as any associated information such as tickets or deployment steps. Validation statuses are also shown here, running on the release PR in aggregate to ensure that it will deploy successfully.
Note: You can configure validations to run automatically only on PRs which are merged into releases and not on an environment's individual feature PRs by configuring the Run validations on final environment setting when creating or editing a pipeline.
A release can be deployed to that environment by selecting it and clicking Deploy Release.
The pull request for the release branch can also be found in your VCS with all included features referenced.
Note - Once changes have been merged into a release, no additional changes to the base feature branches themselves will be automatically synced into the release branch. For more details please read What happens if I add extra commits to the original feature branches that make up the release?
Abandoning a Release without promoting it
If a user wants to close a release without promoting it, select the release, and click the 'more' icon - this stands for "Abandon release".
It will close the release branch and re-open any feature branch pull requests which were included in the release.
Note: Abandoning the release won't affect the features in the release PR in any way, but if you happen to have multiple PRs from the same source branch as part of the release, we'll only reopen one of them with all relevant commits.
Adding features to a Release
After a release has been created, users can add more features by selecting an open pull request and choosing Add to release... from the promotion dialog. Alternatively, you can find the release in the Releases tab and select Add to release.
Both options display the release pop-up in the pipelines UI. Here, you can specify which release to add features to, and what features to add. The Merge into release button will then add them to the referenced release branch.
To remove features from a release, you will need to abandon the release and reopen it using the same set of feature PRs, minus any features you wish to remove.
Merging conflicted features into a Release
Sometimes, multiple features being added to a release will conflict with each other or the release branch in aggregate. If this occurs, we will attempt to merge as many features into the release as possible automatically, marking the other features as failing to merge.
Users can then resolve the conflicts within Gearset and then merge the remaining features into the release branch.
To do this hit the Resolve button:
And from the below panel accept which change is needed or it will also keep the previous resolution checked if it was enabled:
Once the merge conflict is resolved, you can add the feature to the release. To do so:
Head into your final environment in your Pipeline,
Select the release in the Releases tab
Then into features and click on
Merge:
If a feature has an identified conflict against the master branch, so cannot be merged directly, but could still be required as part of a release (e.g. it is dependent on another feature in the release), this feature may be added to a release directly from the Releases panel.
As seen below, the feature cannot be merged or added to a release from the Open pull requests panel.
But you can attempt to add it to the release from the Releases panel (as shown on the screenshots below).
Example of adding a feature from the Releases panel:
Scheduling a Release
You can schedule a release to be deployed. Either in the initial creation of the release, or as shown below.
To do this, select the Schedule deployment in the drop-down menu.
This opens the model, allowing you to select a date and time for the deployment.
Once it has been set up, the deployment of the release will automatically run at the set time. You can see the scheduled release information in the Releases panel:
You can still add features to the scheduled release.
Note: If the environment is blocked at the time of release, Gearset will reschedule the release for 5 minutes later and a warning will be shown. If the deployment fails an error will be shown.
Automatic tagging of Releases
Gearset will automatically tag releases with the release name, making releases easier to search in your Repository. It also makes it easier to:
See whether there are any changes that have been merged to master but haven't been deployed yet.
Review everything that was deployed in the previous release.
Other "Release" related questions
In this section we're addressing other questions about features and functionalities that users often ask us about.
What happens if I add extra commits to the original feature branches that make up the release?
When a feature is merged into a release branch, it should be in a tested, verified and ready-to-release state. Due to this, unlike the classic promotion branch behavior explained here, Pipelines won't automatically layer on extra commits made to the original feature branch into a release branch.
To include these changes in a release, you will need to abandon and recreate the release branch (see Abandoning a Release without Promoting it section) with the correct feature branches containing those extra commits.
β
If you promote the release branch before abandoning/recreating to include the new changes to the feature branch, a Sync PR will open against that final environment to pull in the missing changes.
β
Is it possible to remove a single PR from the Release?
Unfortunately, not. Gearset doesn't offer such option.
β
If you need to remove a single PR from your Release package, you'll have to abandon the entire Release and then re-create it without the PR that needs to be excluded.
β
We're aware we have received feedback (from other users) on our UserVoice forum about such functionality - you're welcome to add your comments and vote for this feature request.
Is it possible to rename a Release package (PR)?
You can rename the release manually in your Git provider. This cannot be done in Gearset app.
Alternatively, you can abandon the release and re-create it with a new name. Read more about abandoning the release here.
Release promotion ordering in pipelines
When promoting a release in Pipelines, the following steps occur:
A validated package exists from the release branch (
gs-release/<release>) to the Production org.The promotion is triggered either manually (by clicking "Promote") or automatically at the scheduled time.
The release branch is merged into
master.This merge triggers the delta CI deployment from
mastertoprod.If the validated package is still eligible for skipping a secondary validation (i.e., no changes have been made to the target org since validation that would invalidate the package), the deployment may use quick deploy.
Quick deploy depends on whether the state of the target org (
prod) has changed since the original validation β such as via other merges or manual changes in the org. Quick deployability is not guaranteed.
Note about back propagation after Release deployment
Back Propagation Releases will back-propagate releases as a single PR.
As a best practice we recommend syncing up all environments to your default base branch (main/master) after a release. This is to prevent unexpected differences in future pull requests.
Moving to a different data region
If you have created a pipeline and wanted to move to a different data region, make sure you abandon all releases in the pipeline first, as releases only work in the same data region they're created in. You'll need to recreate the pipeline along with the releases after the switch.
Do you see an error when adding features to an existing Release?
Do you see below error?
Gearset couldn't merge these features into the release branch automatically due to a feature tracking failure. Please contact us via the in-app chat for help with this issue.
Explanation
You're probably trying to add features while being in a different data region to one the release is created in, e.g. release created in the EU data region and attempting to add features in the US data region.
Please, reach out to us via intercom with a screenshot, and we'll be happy to help.





















