How exactly should gitlab-ci behave to version my project ?
A simple git flow on gitlab could be:
- commit on master -> build, test and deploy to staging
- tag on master -> build, test and deploy to production
But how do you deal with version ?
1- should the deploy version be based on the tag ? if yes do you update the pom.xml with the tag name? (seems dangerous if you make a mistake)
2- should the version be taken care of by maven release ? if yes, how do you trigger deploy to production ? (because the tag is now managed by maven)
What would be best practice here ? (you can propose other flow)