diff --git a/general/security/how_to_sync_security_with_canonical.md b/general/security/how_to_sync_security_with_canonical.md index b3946a0047f000242c64022f331c558fcd2d8c1c..5cae3adc0a6deba1edea7e1e86cb45d482ab74b5 100644 --- a/general/security/how_to_sync_security_with_canonical.md +++ b/general/security/how_to_sync_security_with_canonical.md @@ -22,44 +22,53 @@ Use this option in case of a merge-train failure due to conflicts. 1. Clone the GitLab repository: -```ssh +```shell git clone git@gitlab.com:gitlab-org/gitlab.git # This may take some time ``` 2. Add the security remote: -```ssh +```shell git add remote security git@gitlab.com:gitlab-org/security/gitlab.git ``` 3. Fetch the content from both remotes: -```ssh +```shell git fetch origin git fetch security ``` 4. Create a branch from `security/master` -```ssh +```shell git checkout master --track security/master git checkout -b sync-security-with-canonical ``` 5. Merge `origin/master` into your branch, at this point conflicts will need to be resolved -```ssh -git merge origin/master` +```shell +git merge origin/master ``` 6. Push the changes into `security` (**be careful of not pushing the changes to Canonical**) -```ssh +```shell git push security sync-security-with-canonical ``` -7. Create a merge request and assign it to your release manager counterpart for approval, then set MWPS. +7. Create a merge request and assign it to your release manager counterpart for approval. + +8. Merge the MR manually into _security_ master. We merge manually since MRs on `gitlab-org/security/gitlab` +are forced to have squash commits turned on, and this hides the commit history that we are merging into security master. +We want all canonical commits to be visible on security master. +```shell +git checkout master +git merge security/sync-security-with-canonical +git push security master +``` After these steps, upcoming merge train jobs shouldn't fail anymore.