You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ct...@apache.org on 2010/02/24 01:34:37 UTC

svn commit: r915617 - in /continuum/branches/continuum-1.3.x: continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/bui...

Author: ctan
Date: Wed Feb 24 00:34:37 2010
New Revision: 915617

URL: http://svn.apache.org/viewvc?rev=915617&view=rev
Log:
[CONTINUUM-2437] propagate scm tag of project to build agent
Submitted By: Alftheo Potgieter


Modified:
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java
    continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=915617&r1=915616&r2=915617&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java Wed Feb 24 00:34:37 2010
@@ -930,6 +930,7 @@
             context.setBuildAgentUrl( ContinuumBuildAgentUtil.getBuildAgentUrl( map ) );
             context.setMaxExecutionTime( ContinuumBuildAgentUtil.getMaxExecutionTime( map ) );
             context.setBuildDefinitionLabel( ContinuumBuildAgentUtil.getBuildDefinitionLabel( map ) );
+            context.setScmTag( ContinuumBuildAgentUtil.getScmTag( map ) );
 
             buildContext.add( context );
         }

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java?rev=915617&r1=915616&r2=915617&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java Wed Feb 24 00:34:37 2010
@@ -55,6 +55,8 @@
 
     private String scmPassword;
 
+    private String scmTag;
+
     private int trigger;
 
     private boolean buildFresh;
@@ -215,6 +217,16 @@
         this.scmPassword = scmPassword;
     }
 
+    public String getScmTag()
+    {
+        return scmTag;
+    }
+
+    public void setScmTag( String scmTag )
+    {
+        this.scmTag = scmTag;
+    }
+
     public int getTrigger()
     {
         return trigger;

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java?rev=915617&r1=915616&r2=915617&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/BuildContextToProject.java Wed Feb 24 00:34:37 2010
@@ -43,6 +43,8 @@
 
         project.setScmPassword( buildContext.getScmPassword() );
 
+        project.setScmTag( buildContext.getScmTag() );
+
         project.setExecutorId( buildContext.getExecutorId() );
 
         project.setState( buildContext.getProjectState() );

Modified: continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=915617&r1=915616&r2=915617&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java Wed Feb 24 00:34:37 2010
@@ -198,6 +198,15 @@
                     context.put( ContinuumBuildConstant.KEY_SCM_PASSWORD, project.getScmPassword() );
                 }
 
+                if ( project.getScmTag() != null )
+                {
+                    context.put( ContinuumBuildConstant.KEY_SCM_TAG, project.getScmTag() );
+                }
+                else
+                {
+                    context.put( ContinuumBuildConstant.KEY_SCM_TAG, "" );
+                }
+
                 context.put( ContinuumBuildConstant.KEY_BUILD_DEFINITION_ID, buildDefinitionId );
                 String buildDefinitionLabel = buildDef.getDescription();
                 if ( StringUtils.isEmpty( buildDefinitionLabel ) )