Support versioned software as a first class citizen
Problem to solve
Customers want to automatically increment a package/program version number from within version control when changes are made to a specified branch. GitLab should allow use of tools (ex: NPM or even a human editing a file) that increment package & software version information on a single branch that may already have multiple other commits. Many projects work this way.
It is expected that the target branch here is protected, so CI can’t push to it because it acts as developer and
- Branch approvals are needed
- CI needs to succeed
- It might cause recursion
- etc.
...but if all of the above succeeds it is then impossible to change the version number because everything is already done and CI has exited. The version number can’t simply be bumped in a MR - that has to be done only if the MR succeeds.
Further details
Use of a protected branch means developers can’t directly push and a manual job by another user is not appropriate as customers want the ability to have this automated
Attempting this would require extensive scripting on the part of the customer to ensure
- CI does not endlessly recurse
- Proper content gets committed
- Proper deployments are made
Proposal
GitLab should provide a way to support this method of development.