|
| 1 | +## Releasing a new version |
| 2 | + |
| 3 | +GitLab Shell is versioned by git tags, and the version used by the Rails |
| 4 | +application is stored in |
| 5 | +[`GITLAB_SHELL_VERSION`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/GITLAB_SHELL_VERSION). |
| 6 | + |
| 7 | +For each version, there is a raw version and a tag version: |
| 8 | + |
| 9 | +- The **raw version** is the version number. For instance, `15.2.8`. |
| 10 | +- The **tag version** is the raw version prefixed with `v`. For instance, `v15.2.8`. |
| 11 | + |
| 12 | +To release a new version of GitLab Shell and have that version available to the |
| 13 | +Rails application: |
| 14 | + |
| 15 | +1. Create a merge request to update the [`CHANGELOG`](CHANGELOG) with the |
| 16 | + **tag version** and the [`VERSION`](VERSION) file with the **raw version**. |
| 17 | +2. Ask a maintainer to review and merge the merge request. If you're already a |
| 18 | + maintainer, second maintainer review is not required. |
| 19 | +3. Add a new git tag with the **tag version**. |
| 20 | +4. Update `GITLAB_SHELL_VERSION` in the Rails application to the **raw |
| 21 | + version**. (Note: this can be done as a separate MR to that, or in and MR |
| 22 | + that will make use of the latest GitLab Shell changes.) |
| 23 | + |
| 24 | +## Security releases |
| 25 | + |
| 26 | +GitLab Shell is included in the packages we create for GitLab, and each version of GitLab specifies the version of GitLab Shell it uses in the `GITLAB_SHELL_VERSION` file, so security fixes in GitLab Shell are tightly coupled to the [GitLab security release](https://about.gitlab.com/handbook/engineering/workflow/#security-issues) workflow. |
| 27 | + |
| 28 | +For a security fix in GitLab Shell, two sets of merge requests are required: |
| 29 | + |
| 30 | +* The fix itself, in the `gitlab-org/security/gitlab-shell` repository and its backports to the previous versions of GitLab Shell |
| 31 | +* Merge requests to change the versions of GitLab Shell included in the GitLab security release, in the `gitlab-org/security/gitlab` repository |
| 32 | + |
| 33 | +The first step could be to create a merge request with a fix targeting `main` in `gitlab-org/security/gitlab-shell`. When the merge request is approved by maintainers, backports targeting previous 3 versions of GitLab Shell must be created. The stable branches for those versions may not exist, feel free to ask a maintainer to create ones. The stable branches must be created out of the GitLab Shell tags/version used by the 3 previous GitLab releases. In order to find out the GitLab Shell version that is used on a particular GitLab stable release, the following steps may be helpful: |
| 34 | + |
| 35 | +```shell |
| 36 | +git fetch security 13-9-stable-ee |
| 37 | +git show refs/remotes/security/13-9-stable-ee:GITLAB_SHELL_VERSION |
| 38 | +``` |
| 39 | + |
| 40 | +These steps display the version that is used by `13.9` version of GitLab. |
| 41 | + |
| 42 | +Close to the GitLab security release, a maintainer should merge the fix and backports and cut all the necessary GitLab Shell versions. This allows bumping the `GITLAB_SHELL_VERSION` for `gitlab-org/security/gitlab`. The GitLab merge request will be handled by the general GitLab security release process. |
| 43 | + |
| 44 | +Once the security release is done, a GitLab Shell maintainer is responsible for syncing tags and `main` to the `gitlab-org/gitlab-shell` repository. |
0 commit comments