Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

bamboo variable regex

David Portabella February 26, 2014

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?

3 answers

0 votes
Jared Bunting May 2, 2014

No responses to this? We have the same issue.

0 votes
David Portabella February 26, 2014

"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 _).

0 votes
Jason Monsorno
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2014

Escaping the forward slash with a back slash may solve it. It did in one instance of this case.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events