Cruise Control With Pvcs

Although it's not documented, the source is there and CruiseControl does work with PvcsVersionControl.

ChristianTaubman asks for examples, here supplied by StevenNewton.

Example config.xml entries for CruiseControl 2.0.2 and Ant 1.5 with PVCS version 6.6 or later. Please note that prior to 2.0.2 the PVCS modificationset had a different and better way of handling dateformats. Check the documentation.

  <cruisecontrol>
     <project name="SAFTI">
        <bootstrappers>
           <currentbuildstatusbootstrapper file="currentbuild.txt" />
        </bootstrappers>
        <modificationset quietperiod="30" inDateFormat="yyyy-MMM-dd HH:mm:ss">
           <PVCS pvcsProject="P:/pvcs/develop/dev_db/projects" pvcsSubProject="'/Custom Shared Components/Java/SIC/framework'" />
        </modificationset>
        <schedule interval="3600" intervaltype="relative">
           <ant buildfile="build.xml" target="cleanbuild" multiple="2" />
           <ant buildfile="build.xml" target="masterbuild" multiple="1" />
        </schedule>

[ other sections elided ]

</project> </cruisecontrol>

Relevant parts of the JakartaAnt build.xml:

  <project name="SAFTI" default="compile">
    <property name="pvcs.project" value="/Custom Shared Components/Java/SIC/framework"/>
    <property name="pvcs.repository" value="P:/pvcs/develop/dev_db/projects"/>
    <property name="pvcs.workspace" value="/@/Public/build"/>

[ other targets elided ]

<target name="checkout" description="Pull all from source control"> <pvcs pvcsproject="${pvcs.project}" lineStart="&quot;P:" filenameFormat="{0}_v({1})" workspace="${pvcs.workspace}" repository="${pvcs.repository}" updateonly="false"/> </target>

<target name="update" description="Pull changes from source control"> <pvcs pvcsproject="${pvcs.project}" lineStart="&quot;P:" filenameFormat="{0}_v({1})" workspace="${pvcs.workspace}" repository="${pvcs.repository}" updateonly="true"/> </target>

</project>

Notice by MichaelParker

We had a Problem with the Standard-PVCS Task, because we use an own Promotion-Model configured in PVCS. You can tell the pcli/get command-line-tools provided by Merant which promotiongroup you want to check out and you have to reference the PVCS-configuration-file for that project so that your own promotiongroups are recognized. Additionally he provides separate tasks for PvcsPromote, PvcsVersion.

In the ant-user-mailing list I found extension written by Andrew May which provided this kind of functionality. His motivation, source-code and documentation can be found here: http://marc.theaimsgroup.com/?l=ant-dev&m=99667939904467&w=2

A checkout-task looks like that

    <target name="checkout">
    <echo message="${pvcs.promotionGroup}"/>
        <pvcsget pvcsbin="${pvcsbin}"
                 repository="${pvcs.repository}"
                 force="yes"
                 workspace="${pvcs.workspace}"  
                 promotiongroup="${pvcs.promotionGroup}"   
                 configFile="${pvcs.configFile}"           
                 updateonly="false"     
                 ignoreReturnCode="false">
                <pvcsproject name="${pvcs.project}" />
        </pvcsget>    
    </target>

Notice by WimRosseel

For those using pvcs 7.5 there is also a full set of ant optional tasks to be found here http://sourceforge.net/projects/ant-pvcs-75/ The plugin also properly works with pvcs vm 6.8 as that is the version I'm currently managing.

a typical target would looks like the following:

  <target name="pvcs-labeled-get">
        <!--This task will get the project from the pvcs repository based on a certain label.-->
        <pvcs-config verbose="true" commandlocation="${pvcs.bin}"/>
<pvcs-get recurse="true">
            <entity name="/Physical View"/>
            <projectdatabase location="${pvcs.root}/metadata/${pvcs.projectName}"/>
    <credentials user="pvcsuser"/>
            <version>
                <label name="${pvcs.label}"/>
            </version>
            <workfile/>
        </pvcs-get>
    </target>
The plugin contains targets for getting, locking,unlocking,labeling and removing of labels.

AntPvcs75 as mentioned above also supports promotion groups as well as the features mentioned. I have updated the example build.xml file as the checkout by promotion group example target was missing. Regards Don.

CruiseControlWithPvcsQuestions


EditText of this page (last edited August 4, 2004) or FindPage with title or text search