I have a bamboo plan with Maven task:
verify -B -Dsonar.branch=${bamboo.repository.branch.name}
the problem is that we have a git branch name that contains a '/': "feature/CATALOG", and this is not a valid sonar.branch name.
If I would be running a script task instead of a Maven task, I would replace / by _ as follows:
mvn verify -B -Dsonar.branch=$(echo ${bamboo.repository.branch.name} | tr / _
Is there a way to achieve this with a Maven task?
that is, is it possible to change a variable with a regex or something else?
Community moderators have prevented the ability to post new answers.
No responses to this? We have the same issue.
"scaping the forward slash" means to modify the variable, and this is what I am asking: how to modify the variable inside a bamboo Maven task! (by escaping it, or changing the / to _).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Escaping the forward slash with a back slash may solve it. It did in one instance of this case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.