We are evaluating gitlab for the migration, we are currently using git(on premise) with gerrit code review tool .
During evaulation of gitlab iam seeing it as challenging to design the workflow for our team to adopt.
Below is my workflow usecase
1)Create a Branch from master
2)git commit and push to branch
3)Review by peer developers on the commited code
4)if any review comments, amend the changes and push.
5)Step 3 (review by peer developers)
6)Run the tests on branch
7)Merge the commits to branch by Lead(Maintainer)
8)depoly our dev environment using branch code
9)Merge branch to master by Maintainer.
Need the suggesstions what would be ideal approch, i came across challenges like i cannot amend any changes, does gitlab supports amend?
I’m a little re-iterating over your steps and add my ideas to them.
- Master is the development branch, considered stable where future releases are tagged from
- Create a new branch based off master (
git checkout -b feature/abc)
- Commit, commit, push, commit, push
- Create a Merge Request, can also be prefixed with
WIP: Add blah blah marking this as a work in progress
3.1) CI tests run automatically in each MR creation and push
3.2) CI can also trigger CD which deploys the code into a dev staging environment e.g. in k8s
- Review within the dev team
- Commit changes from review
- Push and let CI run again
- Maintainer approves
7.1) Optional: Rebase, amend and squash via git commands before merging
7.2) Maintainer merges to master
- Master triggers a staging build which gets deployed
- Releases are tagged and CI/CD deploys into production