The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Jared Bunting
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
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 Champions.
February 26, 2014

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events