I'm using GitLab CE with Maven project, and try to follow the Environment branches with GitLab flow and The 11 Rules of GitLab Flow
The step for releasing is as the following: -
feature +--- +--- +---
/ \ / \ / \
master + ---- + ---- + ---- + ---- +
\ \
qa-tmp (chage ver to RC) +--- + ---
\ \
qa + ------------------- + ---------- +
(v1.0-RC1) (v1.1-RC1)
\ \
prod-tmp (chage ver to final) +--- + ---
\ \
prod + ------------------------ + ------------ +
(v1.0) (v1.1)
- Create a
feature
branch and merge into themaster
so that it is ready to be released Create the
qa-tmp
branch e.g.release-v1.0-RC1
frommaster
2.1 Update the pom version to
1.0-RC1
2.2 Merge the
release-v1.0-RC1
toqa
2.3 Tag
v1.0-RC1
from mergedqa
branch.When it pass the QA, create
prod-tmp
branch e.g.release-v1.0
from tagv1.0-RC1
3.1 Update the pom version to
1.0
3.2 Merge the
release-v1.0
to prod3.3 Tag
v1.0
from mergedprod
branch3.4 Bump
master
to version1.1-SNAPSHOT
Develop the version
1.1-SNAPSHOT
in the features & master when it is ready to be released, repeat the step 2 and 3.
The trouble is since the version
is changed during merging the qa
branch and prod
branch, when I perform a next release there is a merge conflict for the version
inside the pom. This cause me to resolve this conflict manually.
I'm not sure if I'm doing something wrong or misunderstanding about the releasing procedure or not.
Furthermore, do we have any practice to make this releasing to be an automation, e.g. via script?
Could you please help to advise?