Owen,

I found the culprit (or may be it was made that way for a reason).

See line 
#67<https://github.com/jenkinsci/copy-to-slave-plugin/blob/master/src/main/java/com/michelin/cio/hudson/plugins/copytoslave/CopyToMasterNotifier.java#L67>in
that plugin's source, it is returning true, that means it'll run only
after all the processes are done and the result is finalised. Check java
docs 
here<http://javadoc.jenkins-ci.org/hudson/tasks/Publisher.html#needsToRunAfterFinalized()>
.
I created a small plugin (which just prints the build number of last
successful build) just to test this and yes if that method returns false,
then things are working as expected.

*When that method return true*

Publishing Javadoc
ERROR: Publisher hudson.tasks.JavadocArchiver aborted due to exception
java.lang.IllegalStateException: basedir
/home/NetBeansProjects/JenkinsDemo/work/jobs/Test/workspace/* does not
exist.
Previous build = 5
Previous build = 5
Finished: FAILURE

*When that method return false*

Previous build = 5
Previous build = 5
Publishing Javadoc
ERROR: Publisher hudson.tasks.JavadocArchiver aborted due to exception
java.lang.IllegalStateException: basedir
/home/NetBeansProjects/JenkinsDemo/work/jobs/Test/workspace/* does not
exist.
Finished: FAILURE


You see the line "Previous build = 5" twice because I waited for some time
(Thread.sleep(2000)) before printing the 2nd line just to see if it waits
till it finishes.


Vivek.



On Thu, Aug 29, 2013 at 9:33 AM, Vivekanand S V <svvivekan...@gmail.com>wrote:

> I saw your report, I see that u face that race condition occasionally, but
> it happens always in my case.
>
> Btw, someone from #jenkins IRC channel gave me a work around for me, as my
> requirement is only the HTML publisher I can directly give the slave system
> path where the reports are located. Though it solves the problem, I now
> have to navigate one level inside (normally we open the job to find the
> reports, now I have to open the job and then open the configuration to find
> the reports).
>
> If your use-case is something like this, then please give it a try :)
>
>
> Vivek.
>
>
> On Tue, Aug 27, 2013 at 3:02 AM, Owen B. Mehegan <o...@nerdnetworks.org>wrote:
>
>> I have noticed this too, and it causes me some headaches in my use of
>> that plugin. I filed this bug, but it has not gotten any attention:
>> https://issues.jenkins-ci.org/browse/JENKINS-16818
>>
>> Paging Romain Seguy!
>>
>>
>> On Sunday, August 25, 2013 11:36:40 PM UTC-7, Vivek wrote:
>>>
>>> Hi,
>>>
>>> I am facing problem while copying files from slave to master machine.
>>> The scenario is given below
>>>
>>> I have jenkins installed (debian package) as master in Ubuntu, have 2
>>> slaves for 32/64 bit Windows 7. I run some test cases in the slave windows
>>> OS' and use copy-to-slave plugin to get back the test case results to
>>> master.
>>>
>>> This is a multi configuration job and after child jobs (1 child job each
>>> for 2 slaves) are finished I publish combined HTML reports in the parent
>>> job.
>>>
>>> Now the problem that I face here is, the child job finishes with
>>> "SUCCESS" without waiting for the copy-to-plugin post build action to
>>> finish. So the HTML Publisher in the parent job fails as the files are not
>>> yet copied to the master.
>>>
>>> *Note 1* : - Though the child job finishes, the copy-to-slave plugin
>>> continues to work and files are successfully copied to the master.
>>>
>>> *Note 2* : - The child job finishes before the post build action only
>>> for copy-to-plugin, it waits till the post build actions are finished for
>>> other plugins.
>>>
>>> Version details :
>>>
>>> Jenkins version - 1.523
>>> Master OS - Ubuntu 12.04
>>> Slave OS' - Windows 7 32 & 64 bit
>>> Copy To Slave Plugin - 1.4
>>>
>>> Have any one faced this kind of issue ? Any inputs/suggestions for
>>> rectifying this behaviour ?
>>>
>>> Thanks,
>>>
>>> Vivek.
>>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jenkinsci-users+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to