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

Capability with space in name as a variable

Arthur Housinger December 2, 2015

I have as a capability "JDK 1.8" and "JDK1.8" (there is a space between the 'K' and the '1').  In a bamboo plan, I'm able to reference "${bamboo.capability.system.jdk.JDK1.8}" (no space) just fine.  However, I can't figure out how to reference the capability with a space.  (I believe that I've tried replacing the space with a '+', '\ ', and just a space.)  Is this possible?

Note related URLs: https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.htmlhttps://confluence.atlassian.com/display/BAMBOO034/Configuring+Remote+Agent+Capabilities+via+bamboo-capabilities.properties

Thanks.

 

3 answers

1 accepted

1 vote
Answer accepted
rverschoor
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.
December 2, 2015

Specifying the variable with a space works for me.
E.g. inline Script Task "echo capability=${bamboo.capability.system.jdk.JDK 1.8.0_45}"  (there's a space between the 'K' and the '1').

Tested in 5.9.7.

0 votes
Jason Pickens May 14, 2020

Has the behaviour for this changed? Using a space does not work for me.

The key is:

capabilityKey=system.jdk.JDK+11

I have tried:

${bamboo.capability.system.jdk.JDK 11}
${bamboo.capability.system.jdk.JDK_11}
${bamboo.capability.system.jdk.JDK${}11}

 They all fail with Bad substitution

0 votes
Arthur Housinger December 3, 2015

Oops, I must have gotten confused with trying various capitalizations. Space does indeed work.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events