IBM / dbb-zappbuild

zAppBuild is a generic build solution for building z/OS applications using Apache Groovy build scripts and IBM Dependency Based Build (DBB) APIs.
Apache License 2.0
40 stars 123 forks source link

Pipeline builds with Git detached head scenarios only returning the last segment of branch names #432

Closed dennis-behm closed 8 months ago

dennis-behm commented 8 months ago

Computation of the git branch in detached head scenario, is returning only last segment of the reference

https://github.com/IBM/dbb-zappbuild/blob/d018b5c83cfb9d2a1f3f40c82aa8e2c8a05a9821/utilities/GitUtilities.groovy#L56-L83

If following a branch naming convention with multiple segments, like below, this can cause conflicts with the DBB collection and build groups.

refs/remotes/origin/feature/setmainbuildbranch
refs/remotes/origin/hotfix/rel-1.0.0/myfix
refs/remotes/origin/implementAI/myFeatureImpl
dennis-behm commented 8 months ago

Delivered via zAppBuild Release 3.5.0