Map<String, String> envVars = new HashMap<String, String>();
if ( defaultBuildagent != null && defaultBuildagent.length() > 0 )
{
// get buildagent to be used from the buildagent group for distributed builds setup
BuildAgentGroupConfiguration group = getContinuum().getConfiguration().getBuildAgentGroup( profile.getBuildAgentGroup() );
if ( group != null )
{
List<BuildAgentConfiguration> agents = group.getBuildAgents();
if ( agents != null )
{
if ( isDefaultBuildAgentEnabledInGroup( defaultBuildagent, agents ) )
{
envVars.put( DistributedReleaseUtil.KEY_BUILD_AGENT_URL, defaultBuildagent );