continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1135020 - in /continuum/trunk: continuum-builder/src/main/resources/META-INF/plexus/ continuum-commons/ continuum-commons/src/main/java/org/apache/maven/continuum/configuration/ continuum-commons/src/test/java/org/apache/maven/continuum/co...
Date Mon, 13 Jun 2011 03:36:39 GMT
Author: ctan
Date: Mon Jun 13 03:36:38 2011
New Revision: 1135020

URL: http://svn.apache.org/viewvc?rev=1135020&view=rev
Log:
[CONTINUUM-2044]
* no longer need to encrypt psk
* updated documentation


Modified:
    continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml
    continuum/trunk/continuum-commons/pom.xml
    continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
    continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt
    continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
    continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt

Modified: continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml (original)
+++ continuum/trunk/continuum-builder/src/main/resources/META-INF/plexus/components.xml Mon
Jun 13 03:36:38 2011
@@ -52,6 +52,9 @@
         <requirement>
           <role>org.apache.continuum.dao.BuildDefinitionDao</role>
         </requirement>
+        <requirement>
+          <role>org.apache.maven.continuum.configuration.ConfigurationService</role>
+        </requirement>
       </requirements>
     </component>
 

Modified: continuum/trunk/continuum-commons/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/pom.xml?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/pom.xml (original)
+++ continuum/trunk/continuum-commons/pom.xml Mon Jun 13 03:36:38 2011
@@ -115,10 +115,6 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.codehaus.redback</groupId>
-      <artifactId>redback-policy</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.codehaus.redback</groupId>
       <artifactId>plexus-spring</artifactId>
       <scope>test</scope>
     </dependency>    

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Mon Jun 13 03:36:38 2011
@@ -39,7 +39,6 @@ import org.apache.maven.continuum.model.
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.codehaus.plexus.redback.policy.PasswordEncoder;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
@@ -75,9 +74,6 @@ public class DefaultConfigurationService
 
     private GeneralConfiguration generalConfiguration;
 
-    @Resource( name="passwordEncoder#sha256" )
-    private PasswordEncoder encoder;
-
     // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
@@ -662,20 +658,7 @@ public class DefaultConfigurationService
 
     public void setSharedSecretPassword( String sharedSecretPassword )
     {
-        String encryptedPassword = encoder.encodePassword( sharedSecretPassword );
-
-        if ( StringUtils.isNotBlank( generalConfiguration.getSharedSecretPassword() ) )
-        {
-            String previousEncodedPassword = generalConfiguration.getSharedSecretPassword();
-            // check if nothing changed
-            if ( previousEncodedPassword.equals( sharedSecretPassword ) || 
-                            previousEncodedPassword.equals( encryptedPassword ) )
-            {
-                return;
-            }
-        }
-
-        generalConfiguration.setSharedSecretPassword( encryptedPassword );
+        generalConfiguration.setSharedSecretPassword( sharedSecretPassword );
     }
 
     // ----------------------------------------------------------------------

Modified: continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
(original)
+++ continuum/trunk/continuum-commons/src/test/java/org/apache/maven/continuum/configuration/ConfigurationServiceTest.java
Mon Jun 13 03:36:38 2011
@@ -161,6 +161,6 @@ public class ConfigurationServiceTest
         service.store();
         service.reload();
 
-        assertNotNull( service.getSharedSecretPassword() );
+        assertEquals( "password", service.getSharedSecretPassword() );
     }
 }

Modified: continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt (original)
+++ continuum/trunk/continuum-docs/src/site/apt/administrator_guides/configuration.apt Mon
Jun 13 03:36:38 2011
@@ -27,6 +27,8 @@ Managing General Configuration
 *---------------------------------+------------------------------------------------------+
 | Enable Distributed Builds       | When checked, this Continuum instance will delegate all
builds to configured agents. |
 *---------------------------------+------------------------------------------------------+
+| Shared Secret Password          | The pre-shared key (PSK) between the master and all configured
agents. The PSK will need to be copied to all configured agents. |
+*---------------------------------+------------------------------------------------------+
 
     You can modify values or keep defaults then save. 
 

Modified: continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
(original)
+++ continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
Mon Jun 13 03:36:38 2011
@@ -82,9 +82,9 @@ Understanding Distributed Builds
 
 * Setup
 
-    * {{{../installation/build-agent.html}Install and Configure}} one or more Build Agents.
+    * {{{./configuration.html}Enable}} the Distributed Builds option and set the Shared Secret
Password in the General Configuration.
 
-    * {{{./configuration.html}Enable}} the Distributed Builds option in the General Configuration.
+    * {{{../installation/build-agent.html}Install and Configure}} one or more Build Agents.
 
     * {{{./build-agents.html}Add}} your Build Agents to the Continuum Master.
 

Modified: continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt?rev=1135020&r1=1135019&r2=1135020&view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt (original)
+++ continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt Mon Jun 13 03:36:38
2011
@@ -49,6 +49,7 @@ Installing and Configuring a Build Agent
       <layout>default</layout>
     </localRepository>
   </localRepositories>
+  <sharedSecretPassword>PSK</sharedSecretPassword>
 </continuum-buildagent-configuration>
 +----------------+
 
@@ -65,7 +66,10 @@ Installing and Configuring a Build Agent
     * <<<localRepositories>>> - a list of the local repositories that will
be used by the build agent when building and releasing projects. 
     The local repository <<<name>>> must match that of the local repository
configured in the Continuum Master. This configuration is 
     only available in Continuum 1.4.0+ to fix {{{http://jira.codehaus.org/browse/CONTINUUM-2391}CONTINUUM-2391}}.
-    
+
+    * <<<sharedSecretPassword>>> - the pre-shared key (PSK) between master
and agent. Copy the PSK configured in the Continuum Master
+    configuration file <<<continuum.xml>>>.
+
   Note that all of your agents need not be identical, as there is a way to control which
agent Continuum chooses by using a
   {{{../administrator_guides/build-agent-groups.html}Build Agent Group}}. In addition, you
need to {{{../administrator_guides/buildEnvironment.html} configure}}
   the Build Environment from the Master in order to specify which installation to use for
the build.
@@ -83,8 +87,9 @@ continuum-buildagent start
 continuum-buildagent.bat console
 +---+
 
-  Next, enable the <<Distributed Builds>> option in the {{{../administrator_guides/configuration.html}General
Configuration}},
-  and {{{../administrator_guides/build-agents.html}add the agent}} to the Continuum Master
server.
+  Next, {{{../administrator_guides/build-agents.html}add the agent}} to the Continuum Master
server. 
+
+  Note that agent will be automatically disabled if the PSK is not configured properly or
if the agent is unreachable by the Continuum Master.  
 
 ~~ TODO:  Does the Jetty bundle still want CONTINUUM_BUILDAGENT_HOME set?
 



Mime
View raw message