continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r719128 - in /continuum/branches/continuum-distributed-builds: continuum-api/src/main/java/org/apache/continuum/configuration/ continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/ continuum-base/continuum...
Date Wed, 19 Nov 2008 23:27:31 GMT
Author: ctan
Date: Wed Nov 19 15:27:31 2008
New Revision: 719128

URL: http://svn.apache.org/viewvc?rev=719128&view=rev
Log:
removed operatingsystem field and add description field to buildconfiguration

Modified:
    continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java
    continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
    continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
    continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java
    continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml
    continuum/branches/continuum-distributed-builds/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
    continuum/branches/continuum-distributed-builds/continuum-commons/src/test/resources/conf/continuum.xml

Modified: continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-api/src/main/java/org/apache/continuum/configuration/BuildAgentConfiguration.java
Wed Nov 19 15:27:31 2008
@@ -4,7 +4,9 @@
 {
     private String url;
 
-    private String operatingSystem;
+    private String type;
+
+    private String description;
 
     private boolean enabled;
 
@@ -13,11 +15,17 @@
         // do nothing
     }
 
-    public BuildAgentConfiguration( String url, String operatingSystem, boolean enabled )
+    public BuildAgentConfiguration( String url, String type, boolean enabled )
+    {
+        this( url, type, null, enabled );
+    }
+
+    public BuildAgentConfiguration( String url, String type, String description, boolean
enabled )
     {
         this.url = url;
-        this.operatingSystem = operatingSystem;
+        this.type = type;
         this.enabled = enabled;
+        this.description = description;
     }
 
     public String getUrl()
@@ -30,14 +38,24 @@
         this.url = url;
     }
 
-    public String getOperatingSystem()
+    public String getType()
+    {
+        return type;
+    }
+
+    public void setType( String type )
+    {
+        this.type = type;
+    }
+
+    public String getDescription()
     {
-        return operatingSystem;
+        return description;
     }
 
-    public void setOperatingSystem( String operatingSystem )
+    public void setDescription( String description )
     {
-        this.operatingSystem = operatingSystem;
+        this.description = description;
     }
 
     public boolean isEnabled()

Modified: continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/java/org/apache/continuum/configuration/DefaultContinuumConfiguration.java
Wed Nov 19 15:27:31 2008
@@ -159,7 +159,8 @@
                 for ( org.apache.continuum.configuration.model.BuildAgentConfiguration agent
: agents )
                 {
                     BuildAgentConfiguration buildAgent = new BuildAgentConfiguration( agent.getUrl(),

-                                                                                      agent.getOperatingSystem(),
+                                                                                      agent.getType(),
+                                                                                      agent.Description(),
                                                                                       agent.isEnabled()
);
                     buildAgents.add( buildAgent );
                 }
@@ -234,8 +235,9 @@
                     org.apache.continuum.configuration.model.BuildAgentConfiguration buildAgent
= 
                         new org.apache.continuum.configuration.model.BuildAgentConfiguration();
                     buildAgent.setUrl( agent.getUrl() );
-                    buildAgent.setOperatingSystem( agent.getOperatingSystem() );
+                    buildAgent.setDescription( agent.getDescription() );
                     buildAgent.setEnabled( agent.isEnabled() );
+                    buildAgent.setType( agent.getType() );
                     
                     buildAgents.add( buildAgent );
                 }

Modified: continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/main/mdo/continuum-configuration.xml
Wed Nov 19 15:27:31 2008
@@ -112,7 +112,7 @@
           <type>String</type>
         </field>
         <field>
-          <name>operatingSystem</name>
+          <name>description</name>
           <version>1.0.1+</version>
           <type>String</type>
         </field>
@@ -121,6 +121,11 @@
           <version>1.0.1+</version>
           <type>boolean</type>
         </field>
+        <field jpox.column="buildagent_type">
+          <name>type</name>
+          <version>1.0.1+</version>
+          <type>String</type>
+        </field>
       </fields>
     </class>    
   </classes>

Modified: continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/java/org/apache/continuum/configuration/TestDefaultContinuumConfiguration.java
Wed Nov 19 15:27:31 2008
@@ -72,7 +72,8 @@
         assertNotNull( generalConfiguration.getBuildAgents() );
         org.apache.continuum.configuration.BuildAgentConfiguration buildAgentConfig = generalConfiguration.getBuildAgents().get(
0 );
         assertEquals( "http://buildagent/xmlrpc", buildAgentConfig.getUrl() );
-        assertEquals( "linux", buildAgentConfig.getOperatingSystem() );
+        assertEquals( "linux", buildAgentConfig.getDescription() );
+        assertEquals( "remote", buildAgentConfig.getType() );
         assertTrue( buildAgentConfig.isEnabled() );
     }
 
@@ -96,8 +97,9 @@
         generalConfiguration.setBuildOutputDirectory( targetDir );
         BuildAgentConfiguration buildAgentConfiguration = new BuildAgentConfiguration();
         buildAgentConfiguration.setUrl( "http://buildagent/test" );
-        buildAgentConfiguration.setOperatingSystem( "windows xp" );
+        buildAgentConfiguration.setDescription( "windows xp" );
         buildAgentConfiguration.setEnabled( false );
+        buildAgentConfiguration.setType( "local" );
         List<BuildAgentConfiguration> buildAgents = new ArrayList<BuildAgentConfiguration>();
         buildAgents.add( buildAgentConfiguration );
         generalConfiguration.setBuildAgents( buildAgents );
@@ -110,13 +112,15 @@
         assertTrue( contents.indexOf( "8080" ) > 0 );
         assertTrue( contents.indexOf( "http://buildagent/test" ) > 0 );
         assertTrue( contents.indexOf( "windows xp" ) > 0 );
-
+        
         configuration.reload();
         assertEquals( "http://test/zloug", configuration.getGeneralConfiguration().getBaseUrl()
);
         assertEquals( "localhost", configuration.getGeneralConfiguration().getProxyConfiguration().getProxyHost()
);
         assertEquals( 8080, configuration.getGeneralConfiguration().getProxyConfiguration().getProxyPort()
);
         assertEquals(targetDir.getPath(), configuration.getGeneralConfiguration().getBuildOutputDirectory().getPath());
         assertEquals( "http://buildagent/test", configuration.getGeneralConfiguration().getBuildAgents().get(
0 ).getUrl() );
+        assertEquals( "local", configuration.getGeneralConfiguration().getBuildAgents().get(
0 ).getType() );
+        assertFalse( configuration.getGeneralConfiguration().getBuildAgents().get( 0 ).isEnabled()
);
         log.info( "generalConfiguration " + configuration.getGeneralConfiguration().toString()
);
     }
 }

Modified: continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-base/continuum-configuration/src/test/resources/conf/continuum.xml
Wed Nov 19 15:27:31 2008
@@ -5,8 +5,9 @@
   <buildAgents>
     <buildAgent>
       <url>http://buildagent/xmlrpc</url>
-      <operatingSystem>linux</operatingSystem>
+      <description>linux</description>
       <enabled>true</enabled>
+      <type>remote</type>
     </buildAgent>
   </buildAgents>
 </continuum-configuration>
\ No newline at end of file

Modified: continuum/branches/continuum-distributed-builds/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
Wed Nov 19 15:27:31 2008
@@ -94,7 +94,7 @@
         service.setUrl( "http://test/zloug" );
         service.setBuildOutputDirectory( new File( "testBuildOutputDir" ) );
 
-        BuildAgentConfiguration buildAgent = new BuildAgentConfiguration( "http://test/xmlrpc",
"windows", false );
+        BuildAgentConfiguration buildAgent = new BuildAgentConfiguration( "http://test/xmlrpc",
"local", "windows", false );
         service.addBuildAgent( buildAgent );
 
         service.store();
@@ -107,7 +107,9 @@
         assertEquals( "http://test/zloug", service.getUrl() );
         assertEquals( "check # build agents", 2, service.getBuildAgents().size() );     
  
         assertEquals( "http://test/xmlrpc", service.getBuildAgents().get( 1 ).getUrl() );
-        assertEquals( "windows", service.getBuildAgents().get( 1 ).getOperatingSystem() );
+        assertEquals( "local", service.getBuildAgents().get( 1 ).getType() );
+        assertEquals( "windows", service.getBuildAgents().get( 1 ).getDescription() );
+        assertFalse( service.getBuildAgents().get( 1 ).isEnabled() );
 
         assertEquals( "http://test/xmlrpc", buildAgent.getUrl() );
         service.removeBuildAgent( buildAgent );
@@ -116,6 +118,8 @@
 
         assertEquals( "check # build agents", 1, service.getBuildAgents().size() );
         assertEquals( "http://buildagent/xmlrpc", service.getBuildAgents().get( 0 ).getUrl()
);
-        assertEquals( "linux", service.getBuildAgents().get( 0 ).getOperatingSystem() );
+        assertEquals( "linux", service.getBuildAgents().get( 0 ).getDescription() );
+        assertEquals( "remote", service.getBuildAgents().get( 0 ).getType() );
+        assertTrue( service.getBuildAgents().get( 0 ).isEnabled() );
     }
 }

Modified: continuum/branches/continuum-distributed-builds/continuum-commons/src/test/resources/conf/continuum.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-distributed-builds/continuum-commons/src/test/resources/conf/continuum.xml?rev=719128&r1=719127&r2=719128&view=diff
==============================================================================
--- continuum/branches/continuum-distributed-builds/continuum-commons/src/test/resources/conf/continuum.xml
(original)
+++ continuum/branches/continuum-distributed-builds/continuum-commons/src/test/resources/conf/continuum.xml
Wed Nov 19 15:27:31 2008
@@ -5,8 +5,9 @@
   <buildAgents>
     <buildAgent>
       <url>http://buildagent/xmlrpc</url>
-      <operatingSystem>linux</operatingSystem>
+      <description>linux</description>
       <enabled>true</enabled>
+      <type>remote</type>
     </buildAgent>
   </buildAgents>
   <distributedBuildEnabled>true</distributedBuildEnabled>



Mime
View raw message