Optional per buildagent properties

Hi,

 

I'm currently struggling with this problem:

Our project has two buildagent pools:

1.) Special network segment buildagents

2.) Open network buildagents

 

In a buildconfig we use rsync and use ssh with the ProxyCommand to tunnel thru an http proxy.

But I want to include the ProxyCommand option only via build property which is set on the buildagents.

 

Problem is:

As soon as I use %ssh_option_proxy_command% in a command line runner, it get's an implicit dependency to the build agents from pool no.1.

What I want is to run on all build agents from both pools, but in one command line runner with the ProxyCommand from the buildAgent.properties file and on the other case without the ProxyCommand at all.

Is there a way to replace %ssh_option_proxy_command% with an default of non-existent when not set on the build agent?

%?ssh_option_proxy_command% -> when set on the build agent -> replace with property value, if set use the value from the build agent.

 

is there a way to achieve above setup in TC10?

 

0
1 comment

Hi Thomas,

I assume you are using this either in a ssh exec or custom script. Depending on the content of the parameter, it should be easy to use. If you add the full command as a line to the script, then having an empty parameter (or a simple "echo something") should ignore that line. If you have it as part of a command instead, you could either replace the full command by it, or simply check the parameter for its contents before applying the comment and ensure it's not empty, then have the parameter be an empty string on the agent that doesn't need it.

0

Please sign in to leave a comment.