Package org.apache.continuum.configuration

Examples of org.apache.continuum.configuration.BuildAgentGroupConfiguration


        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 );
View Full Code Here


    }
   
    public void testGetEnvironmentsDefaultAgentInGroup()
        throws Exception
    {
        BuildAgentGroupConfiguration buildAgentGroup = createBuildAgentGroupConfiguration( true );
        buildAgentGroup.addBuildAgent( new BuildAgentConfiguration( defaultBuildagentUrl, "Default Build Agent", true ) );
       
        continuumMock.expects( atLeastOnce() ).method( "getConfiguration" ).will( returnValue( configurationServiceMock.proxy() ) );
        configurationServiceMock.expects( atLeastOnce() ).method( "getBuildAgentGroup" ).will( returnValue( buildAgentGroup ) );
       
        action.getEnvironments();
View Full Code Here

    }
   
    public void testGetEnvironmentsDefaultAgentNotInGroup()
        throws Exception
    {
        BuildAgentGroupConfiguration buildAgentGroup = createBuildAgentGroupConfiguration( true );
       
        continuumMock.expects( atLeastOnce() ).method( "getConfiguration" ).will( returnValue( configurationServiceMock.proxy() ) );
        configurationServiceMock.expects( atLeastOnce() ).method( "getBuildAgentGroup" ).will( returnValue( buildAgentGroup ) );
       
        action.getEnvironments();
View Full Code Here

    }
   
    public void testGetEnvironmentsNoEnabledAgentInGroup()
        throws Exception
    {
        BuildAgentGroupConfiguration buildAgentGroup = createBuildAgentGroupConfiguration( false );
        buildAgentGroup.addBuildAgent( new BuildAgentConfiguration( defaultBuildagentUrl, "Default Build Agent", false ) );
       
        continuumMock.expects( atLeastOnce() ).method( "getConfiguration" ).will( returnValue( configurationServiceMock.proxy() ) );
        configurationServiceMock.expects( atLeastOnce() ).method( "getBuildAgentGroup" ).will( returnValue( buildAgentGroup ) );
       
        action.getEnvironments();
View Full Code Here

    }
   
    public void testGetEnvironmentsNoAgentInGroup()
        throws Exception
    {
        BuildAgentGroupConfiguration buildAgentGroup = new BuildAgentGroupConfiguration();
       
        continuumMock.expects( atLeastOnce() ).method( "getConfiguration" ).will( returnValue( configurationServiceMock.proxy() ) );
        configurationServiceMock.expects( atLeastOnce() ).method( "getBuildAgentGroup" ).will( returnValue( buildAgentGroup ) );
       
        action.getEnvironments();
View Full Code Here

       
        List<BuildAgentConfiguration> buildAgents = new ArrayList<BuildAgentConfiguration>();
        buildAgents.add( buildagent1 );
        buildAgents.add( buildagent2 );
       
        BuildAgentGroupConfiguration buildAgentGroup = new BuildAgentGroupConfiguration( "BUILDAGENT_GROUP", buildAgents );
       
        return buildAgentGroup;
    }
View Full Code Here

    private OverallDistributedBuildQueue getOverallDistributedBuildQueueByAgentGroup( Map<Integer, Integer> projectsAndBuildDefinitionsMap )
        throws ContinuumException
    {
        OverallDistributedBuildQueue whereToBeQueued = null;

        BuildAgentGroupConfiguration buildAgentGroup = getBuildAgentGroup( projectsAndBuildDefinitionsMap );

        if ( buildAgentGroup != null )
        {
            List<BuildAgentConfiguration> buildAgents = buildAgentGroup.getBuildAgents();

            if ( buildAgents != null && buildAgents.size() > 0 )
            {
                List<String> buildAgentUrls = new ArrayList<String>();
               
View Full Code Here

            if ( profile != null && !StringUtils.isEmpty( profile.getBuildAgentGroup() ) )
            {
                String groupName = profile.getBuildAgentGroup();

                BuildAgentGroupConfiguration buildAgentGroup = configurationService.getBuildAgentGroup( groupName );

                return buildAgentGroup;
            }
        }
        catch ( ContinuumStoreException e )
View Full Code Here

    }
   
    private boolean hasBuildagentGroup( Map<Integer, Integer> projectsAndBuildDefinitionsMap )
        throws ContinuumException
    {
        BuildAgentGroupConfiguration buildAgentGroup = getBuildAgentGroup( projectsAndBuildDefinitionsMap );

        return buildAgentGroup != null &&
               buildAgentGroup.getName().length() > 0 ? true : false;
    }
View Full Code Here

    }
   
    private boolean hasBuildagentInGroup( Map<Integer, Integer> projectsAndBuildDefinitionsMap )
        throws ContinuumException
    {
        BuildAgentGroupConfiguration buildAgentGroup = getBuildAgentGroup( projectsAndBuildDefinitionsMap );

        return buildAgentGroup != null &&
               buildAgentGroup.getBuildAgents().size() > 0 ? true : false;
    }
View Full Code Here

TOP

Related Classes of org.apache.continuum.configuration.BuildAgentGroupConfiguration

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.