fix selecting wrong master branch
This PR is about fixing the builder_get_git_lib
function, when it picks up branch that start with a string, instead of the actual $VERSION_STRING
specified in the pipeline conf.
for example, if a master
branch is selected as the second arg of the func, and there are multiple branches present in the repo that start with master
, ie. master-test
.
Also on request from @divish the logic has been changed to pick up the EXACT branch in case of branches, or latest tag if it starts with tags/
.
https://gitlab.builder.ai/devops/client_projects/staging/1672929-dev-infra/-/jobs/70938745#L130
Testing the function locally, this behaviour can be observed:
the tags/N.
behaviour of selecting the latest (as per the semver notation) is preserved.
create_cluster
picking up platform-automation-tools:
https://gitlab-internal.builder.ai/devsecops/team/giovannif/giovannif-platform/-/jobs/578818