CruiseControl.NET - 项目不存在

时间:2010-07-20 19:45:51

标签: continuous-integration cruisecontrol.net automated-tests cruisecontrol continuous

我在服务器上安装了CruiseControl.NET。我让一切都很完美。一切都意味着,从SVN中提取代码,构建它,在成功构建之后,启动项目设置,使用项目触发器将代码部署到DEV环境。我添加了一些内部安全设置,主要是用户组。我正在使用LDAP安全性。当我添加安全功能时,我对DEV服务器的自动部署退出工作。我可以强制构建项目以使其部署,但是当项目#1构建成功时,当部署项目的触发器启动时,我得到以下错误(出于安全目的,我用PROJECT替换了项目名称):

  

2010-07-20 13:28:19,354 [PROJECT:DEBUG]从服务器检索ProjectStatus:tcp:// localhost:21234 / CruiseManager.rem
  2010-07-20 13:28:19,355 [项目:错误]例外:CCNet服务器上不存在项目“PROJECT”。

     

ThoughtWorks.CruiseControl.Remote.NoSuchProjectException:CCNet服务器上不存在项目“PROJECT”。
    在ThoughtWorks.CruiseControl.Core.Triggers.ProjectTrigger.GetCurrentProjectStatus()
    在ThoughtWorks.CruiseControl.Core.Triggers.ProjectTrigger.Fire()
    在ThoughtWorks.CruiseControl.Core.Triggers.MultipleTrigger.Fire()
    在ThoughtWorks.CruiseControl.Core.ProjectIntegrator.PollTriggers()
    在ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Integrate()
    在ThoughtWorks.CruiseControl.Core.ProjectIntegrator.Run()

我有一个CruiseControl的活动目录帐户设置,该服务正在该用户帐户(具有管理员权限)下运行。通过将用户添加到CruiseControl配置的内部设置部分中的“admin”组,我已经让CruiseControl用户可以完全访问所有项目。

有关如何使项目可供CruiseControl访问的任何想法,以便它可以看到执行自动部署吗?

2 个答案:

答案 0 :(得分:0)

这是自动部署代码,它监视Web项目,一旦成功构建,这应该启动。而且,如果没有内部安全配置,这确实有效:

<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>

答案 1 :(得分:0)

我认为您需要为角色定义安全设置 - 我没有看到任何内部安全标记。你拥有AD perms和账户,这一切都很好,但你需要告诉CCNet这些意味着什么。尝试在项目标签内添加以下内容(当然,在更改域名和组名后):

<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>