continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r724689 - in /continuum/branches/continuum-distributed-builds: continuum-builder/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/
Date Tue, 09 Dec 2008 13:37:37 GMT
Author: ctan
Date: Tue Dec  9 05:37:36 2008
New Revision: 724689

URL: http://svn.apache.org/viewvc?rev=724689&view=rev
Log:
more fixes

Modified:
    continuum/branches/continuum-distributed-builds/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
    continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java

Modified: continuum/branches/continuum-distributed-builds/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=724689&r1=724688&r2=724689&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
Tue Dec  9 05:37:36 2008
@@ -157,46 +157,60 @@
     {
         boolean found = false;
         
-        for ( BuildAgentListener listener : listeners )
+        if ( listeners.size() > 0 )
         {
-            if ( !listener.isBusy() && listener.isEnabled() )
+            for ( BuildAgentListener listener : listeners )
             {
-                log.info( "initializing buildContext" );
-                List buildContext = initializeBuildContext( projectsAndBuildDefinitionsMap,
trigger, listener );
-/*
-                try
-                {
-                    ContinuumDistributedBuildClient client = new ContinuumDistributedBuildClient(
new URL( listener.getUrl() ) );
-                    client.ping();
-                }
-                catch ( MalformedURLException e )
+                if ( !listener.isBusy() && listener.isEnabled() )
                 {
-                    throw new ContinuumException( "Invalid url", e );
+                    log.info( "initializing buildContext" );
+                    List buildContext = initializeBuildContext( projectsAndBuildDefinitionsMap,
trigger, listener );
+    
+/*                  try
+                    {
+                        ContinuumDistributedBuildClient client = new ContinuumDistributedBuildClient(
new URL( listener.getUrl() ) );
+                        // ping client
+                        client.ping();
+                        
+                        // initialize buildcontext
+                    }
+                    catch ( MalformedURLException e )
+                    {
+                        throw new ContinuumException( "Invalid url", e );
+                    }
+                    catch ( XmlRpcException e )
+                    {
+                        throw new ContinuumException( "", e );
+                    }
+                    catch ( Exception e )
+                    {
+                        
+                    }*/
+    
+                    //{
+                        //client.ping();
+                        //found = true; 
+                        //client.buildProjects( buildContext );
+                    //}
+                    //catch ( XmlRpcException e )
+                    //{
+                        //do something about the server Url
+                        //client.getServerUrl();
+                        //get projects of buildagent and set to build error the first project.
+                    //}
+                    log.info( "dispatched build to " + listener.getUrl() );
+                    found = true;
                 }
-                catch ( XmlRpcException e )
+                else
                 {
-                    throw new ContinuumException( "", e );
+                    log.info( "build agent '" + listener.getUrl() + "' currently busy or
not enabled" );
                 }
-                catch ( Exception e )
-                {
-                    
-                }*/
-
-                //{
-                    //client.ping();
-                    //found = true; 
-                    //client.buildProjects( buildContext );
-                //}
-                //catch ( XmlRpcException e )
-                //{
-                    //do something about the server Url
-                    //client.getServerUrl();
-                    //get projects of buildagent and set to build error the first project.
-                //}
-                log.info( "dispatched build to " + listener.getUrl() );
-                found = true;
             }
         }
+        else
+        {
+            log.info( "no build agent configured" );
+        }
     }
 
     public void updateProjectScmRoot( Map context )

Modified: continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=724689&r1=724688&r2=724689&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
Tue Dec  9 05:37:36 2008
@@ -61,7 +61,7 @@
     public String input()
         throws Exception
     {
-        if ( buildAgent != null && StringUtils.isBlank( buildAgent.getUrl() ) )
+        if ( buildAgent != null && !StringUtils.isBlank( buildAgent.getUrl() ) )
         {
             List<BuildAgentConfiguration> agents = getContinuum().getConfiguration().getBuildAgents();
             



Mime
View raw message