fabric8io/fabric8-pipeline-library

Use semver to work out maven project release versions

Opened this issue · 0 comments

Currently our maven Jenkinsfile library works out the release version using the jenkins build number which is bad if the jenkins job is ever recreated.

We could extract this semver code that java fabric8 projects uses itself to work out the next version.

https://github.com/fabric8io/fabric8-pipeline-library/blob/master/src/io/fabric8/Fabric8Commands.groovy#L180-L209

Then call this new function from the Jenkinsfiles here https://github.com/fabric8io/fabric8-jenkinsfile-library/blob/master/maven/CanaryReleaseStageAndApprovePromote/Jenkinsfile#L25

Bonus points for adding the first unit test for the library too ;)