CruiseControl.NET - Project Does Not Exist

I have CruiseControl.NET setup on a server. I had everything working perfectly. Everything meaning, pull the code from SVN, build it, upon successful build, kick off a project setup with a project trigger to deploy the code to the DEV environment. I added some internal security settings, mainly just groups of users. I'm using LDAP security. When I added the security features in, my automated deployment to the DEV server quit working. I can force build the project to make it deploy, but when project #1 builds successfully, I get the error below when the trigger of the deploy project kicks off (I replaced the project name with PROJECT for security purposes):

2010-07-20 13:28:19,354 [PROJECT:DEBUG] Retrieving ProjectStatus from server: tcp://localhost:21234/CruiseManager.rem 2010-07-20 13:28:19,355 [PROJECT:ERROR] Exception: The project 'PROJECT' does not exist on the CCNet server.

ThoughtWorks.CruiseControl.Remote.NoSuchProjectException: The project 'PROJECT' does not exist on the CCNet server. at ThoughtWorks.CruiseControl.Core.Triggers.ProjectTrigger.GetCurrentProjectStatus() at ThoughtWorks.CruiseControl.Core.Triggers.ProjectTrigger.Fire() at ThoughtWorks.CruiseControl.Core.Triggers.MultipleTrigger.Fire() at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.PollTriggers() at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate() at ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run()

I have an active directory account setup for CruiseControl, and the service is running under that user account (which has admin rights). I have given the CruiseControl user full access to all the projects by adding the user to the my "admin" group in the internal settings section of the CruiseControl config.

Any ideas on how to make the project accessible to CruiseControl so it can see an execute the auto deployment?

Answers


Here is the auto deployment code, which monitors the web project, once successfully built, this should fire off. And, this does work without the internal security configuration:

<cb:scope ProjectName="$(projMhWebDevDeploy)">
<project name="$(projMhWebDevDeploy)" queue="Q1" queuePriority="1">
  <cb:define safeProjectName="MH_Web_Dev_Branch_Deployment"/>
  <cb:define projectDirectory="$(ccnetDirectory)\Projects\$(safeProjectName)"/>

  <triggers>
    <projectTrigger project="$(projMhWeb)">
      <triggerStatus>Success</triggerStatus>
      <innerTrigger type="intervalTrigger" seconds="5" buildCondition="IfModificationExists" />
    </projectTrigger>
    <projectTrigger project="$(projMhWeb)">
      <triggerStatus>Success</triggerStatus>
      <innerTrigger type="intervalTrigger" seconds="5" buildCondition="ForceBuild" />
    </projectTrigger>
  </triggers>

  <category>DEV Deployments</category>
  <webURL>$(urlCcnetDashBoard)</webURL>
  <workingDirectory>$(projectDirectory)</workingDirectory>
  <artifactDirectory>$(ccnetDirectory)\BuildFiles\$(safeProjectName)</artifactDirectory>

  <tasks>
    <!-- Deploy Code -->
    <exec>
      <executable>$(deployCodeBat)</executable>
      <buildArgs>
        $(ccnetDirectory)\Projects\MH_Web\Web
        $(deployMhWebDev)
        brh
      </buildArgs>
      <baseDirectory>$(ccnetDirectory)\BatchFiles\</baseDirectory>
    </exec>
    <!-- Deploy Helicon HTTPD -->
    <exec>
      <executable>$(deployHeliconBat)</executable>
      <buildArgs>
        $(ccnetDirectory)\Projects\MH_Web\Web
        "$(deployHeliconDev)"
        httpd.conf
      </buildArgs>
      <baseDirectory>$(ccnetDirectory)\BatchFiles\</baseDirectory>
    </exec>
  </tasks>
  <publishers>
    <xmllogger />
    <modificationHistory onlyLogWhenChangesFound="true" />
    <email mailport="25" includeDetails="true" useSSL="false" from="FROM" mailhost="SERVER">
      <users>
        EMAIL ADDRESSES ARE HERE
      </users>
      <groups>
        <group name="BuildMaster">
          <notifications>
            <notificationType>Always</notificationType>
          </notifications>
        </group>
      </groups>
    </email>
  </publishers>
  <security type="defaultProjectSecurity" defaultRight="Deny">
    <permissions>
      <rolePermission name="Developers" ref="Developers"/>
      <rolePermission name="Admin" ref="Admin"/>
    </permissions>
  </security>
</project>   
</cb:scope>

I think that you will need to define the security settings for your roles - I don't see any internal security markup there. It's all well and good that you have the AD perms and accounts, but you need to tell CCNet what those mean. Try adding the below inside of your project tags (after changing the domain and group names, of course):

<internalSecurity>        
    <permissions>
        <!-- Roles -->
        <rolePermission name="Admin" forceBuild="Allow" startProject="Allow" >
            <users>
                <userName name="DOMAIN\GROUP1\"/>
            </users>         
        </rolePermission>
        <rolePermission name="Developers" forceBuild="Deny" startProject="Deny">
            <users>
                <userName name="DOMAIN\GROUP2\"/>
            </users>
        </rolePermission>
    </permissions>
</internalSecurity>

Need Your Help

Can AspectJ weave through sun.net.* packages?

java aop aspectj aspect

I'm using AspectJ to intercept java.net.Socket calls.