Hi Craig, Our configuration is quite big right now, and makes intensive use of preprocessing. I will try to write a simple test case. In the meantime, the only difference I can see from your simple configuration is that my conditional publishing tasks are in the publishers section (not the tasks one). Maybe that would be a key point for this problem.
Thanks for your help. Mac On 21 fév, 20:50, "Craig Sutherland" <[email protected]> wrote: > Hi Mac, > > Thanks for the additional feedback. I've tried to track down what is causing > this problem but without any success :-( > > I have modified the BuildPublisher task to both provide additional logging > and to explicitly check for the presence of the source directory (and to > report when not found.) From the looks of things it is correctly generating > the relative directory name, so I'm not sure where else to look. > > Here is the configuration that I am using: > <cruisecontrol xmlns="http://thoughtworks.org/ccnet/1/6" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > <project name="RelativeFolders"> > <workingDirectory>C:\Temp\Working</workingDirectory> > <artifactDirectory>C:\Temp\Artifact</artifactDirectory> > <tasks> > <conditional> > <conditions> > <folderExistsCondition> > <folder>C:\NewFolder</folder> > </folderExistsCondition> > </conditions> > <tasks> > <buildpublisher> > <alwaysPublish>true</alwaysPublish> > <sourceDir>SomeWhere</sourceDir> > <publishDir>ElseWhere</publishDir> > </buildpublisher> > </tasks> > <elseTasks> > <buildpublisher> > <alwaysPublish>true</alwaysPublish> > <sourceDir>SomeWhere</sourceDir> > <publishDir>ElseWhere</publishDir> > </buildpublisher> > </elseTasks> > </conditional> > </tasks> > </project> > </cruisecontrol> > > And I get the following output in the log: > [RelativeFolders:DEBUG] Checking conditions > [RelativeFolders:DEBUG] Checking for folder 'C:\NewFolder' > [RelativeFolders:INFO] Conditions passed - running tasks > [RelativeFolders:DEBUG] Starting task 'BuildPublisher [0]' > [RelativeFolders:DEBUG] Publish directory is 'C:\Temp\Artifact\ElseWhere' > [RelativeFolders:DEBUG] Source directory is 'C:\Temp\Working\SomeWhere' > [RelativeFolders:WARN] Source directory 'C:\Temp\Working\SomeWhere' does not > exist - cancelling task > [RelativeFolders:INFO] Tasks completed: 0 successful, 1 failed > [RelativeFolders:INFO] Integration complete: Failure - 22/02/2011 8:26:20 > a.m. > > Are you able to provide an example configuration where this problem occurs? > > Craig > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of Mac > Sent: Tuesday, 22 February 2011 5:02 a.m. > To: ccnet-user > Subject: [ccnet-user] Re: Conditional and FTP tasks handling of relative > directories > > Hi Craig, > > I made some further tests and it appears that: > * buildpublisher/sourceDir understands relative paths in general. > * buildpublisher/sourceDir does *not* understand relative paths when used > inside a conditional task. This is the behaviour that puzzled me before. > > This behaviour is hard to detect, because the buildpublisher does not > complain (and/or output any trace) when the source directory does not exist. > > Seen from (very, very) far away, I would say something unexpected happens > when cloning the integration result (line 408 in > ConditionalTask.cs,http://ccnet.svn.sourceforge.net/viewvc/ccnet/trunk/project/core/task... > tionalTask.cs?revision=7881&view=markup). > > Mac > > On 21 fév, 16:22, Mac <[email protected]> wrote: > > Hi Craig, > > > Thank you for taking care of this matter. > > > I was pretty sure I tested a relative path and that it did not work. > > But the code seems to be taking care of relative paths alright, so I > > checked again (with TRACE level logs) and it seems I was wrong. > > Paths in the folderExistsCondition *are* relative Sorry for this false > > alarm. > > > Mathieu > > > On 18 fév, 01:35, "Craig Sutherland" <[email protected]> > > wrote: > > > > Hi Mac, > > > > I have gone and updated the Ftp task to use relative paths - however > > > it looks like the path in folderExistsCondition is already a relative > path? > > > > Craig > > > > -----Original Message----- > > > From: [email protected] > > > [mailto:[email protected]] On > > > > Behalf Of Mac > > > Sent: Wednesday, 16 February 2011 3:16 a.m. > > > To: ccnet-user > > > Subject: [ccnet-user] Conditional and FTP tasks handling of relative > > > directories > > > > Hi all, > > > > I have just been caught by this feature: almost every task in CCNet > > > understands relative directories (from the current working directory). > > > For instance the sourceDir property of the buildPublisher task, or > > > the attachments property of the email task. > > > > But the following properties do not (I checked the source code to be > > > sure) : > > > * folderExistsCondition in the conditional task. > > > * localFolderName in the FTP task. > > > > I got mislead by that, and I suppose other people will/have been. So > > > I suggest (either) : > > > * make these properties understand relative folders (preferred IMHO). > > > * or make it clear in the documentation that paths must be complete > > > for these properties. > > > > What do you think? > > > > Mac
