Home
TeamSite
Can you exclude a particular file in a deployment?
dlsoderberg
Hello, and thanks in advnace for any help that is offered.
I know that you can create a filelist that OD will read and only deploy those files in the list, but is there a way to do the exact opposite? I need to have a deployment that currently deploys everything in TS STAGING omit a couple of files and I'm not sure how to do it.
Thanks for any help.
Dave
Find more posts tagged with
Comments
Dwayne
Take a look at the exclude filters in the OD manual. Will they do what you want?
Just a word of caution: if your deployment config file has "do deletes" turned on, then make sure you exclude your files in
both
the source and the destination. If you just exclude from the source, then OD is going to delete those files on the destination, if they exist! Becase, as far as OD is concerned, excluded files don't exist in the node they're excluded from. And if OD sees a file on the destination that "doesn't exist" on the source, it's going to try to delete it.
--
Current project: TS 5.5.2/6.1 W2K
dlsoderberg
Thanks for the help...I think this will work just fine for me!
dlsoderberg
Can someone please tell me if the additions I have made look correct. I need to exclude the following files:
sanford/consumer/jhtml/contact/contactNew.jhtml
sanford/consumer/jhtml/contact/contactusFormfrag.jhtml
sanford/consumer/jhtml/contact/contactusfrag.jhtml
Here is one of the definitions from my deployment script:
<definition name="prod_jhtml">
<source>
<sourceFilesystem area="/teamsite/iwmnt/default/main/sanford/STAGING/sanford/consumer/jhtml" filelist="">
<pathSpecification>
<path name="." />
<filters>
<excludePath subPath="/teamsite/iwmnt/default/main/sanford/STAGING/sanford/consumer/jhtml/contact" />
<excludePattern regex=".*contactNew\.jhtml$" />
<excludePattern regex=".*contactusFormfrag\.jhtml$" />
<excludePattern regex=".*contactusfrag\.jhtml$" />
</filters>
</pathSpecification>
</sourceFilesystem>
</source>
<target useReplicationFarm="prod_webapps">
<targetFilesystem area="/apps/deploy/docroot/sanford/consumer/jhtml" />
<filters>
<excludePath subPath="/apps/deploy/docroot/sanford/consumer/jhtml/contact" />
<excludePattern regex=".*contactNew\.jhtml$" />
<excludePattern regex=".*contactusFormfrag\.jhtml$" />
<excludePattern regex=".*contactusfrag\.jhtml$" />
</filters>
<comparisonRules dateDifferent="yes" revert="no" ignoreAcls="yes" ignoreModes="yes" ignoreUser="yes" ignoreGroup="yes" />
<transferRules doDeletes="no" dontDo="no" preserveAcls="no" followLinks="no" svrTryCount="" svrTryInterval="" svrTryDisableOverwrite="no" rmReadOnly="no" compression="no" compressionLevel="" />
</target>
</definition>
Thanks in advance for any help.
Adam Stoller
Since you have doDeletes="no" you would probably only need the first set of filters (preventing files from being deployed) and not the second set of filters (which would prevent them from being deleted given the first set of filters).
I'm not positive, but I believe the subPath in the first filter should be relative to the 'area' and 'path' information so it should probably look more like:
<excludePath subPath="./contact"/>
I think you could also simply the latter 3 filters into a single regex since it looks like you don't want to deploy *anything* within this 'contact' directory to look like:
<excludePattern regex="/contact/.*"/>
To be sure though - make the changes and then run the deployment with the '-sim' flag and look through the output logfiles - the '-sim' flag will simulate the deployment and not actually "do" it.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
dlsoderberg
Thanks for the help fish!
I'll try the change to the relative path, but as for the excludePattern, the directory actually has a multitude of files in it and I only need to exclude these 3. That's why I had the 3 separate reg ex's for them.