Open DominicOram opened 4 years ago
Very wierd - logic looks OK in batch script i.e. errorlevel is not checked when nested. You could try:
setlocal enabledelayedexpansion
and then use !errorlevel! instead of %errorlevel% but that shouldn't make a difference. May be a robocopy issue, in which case all you could do is a separate "exists" block to check the directory
robocopy help says
0×00 0 No errors occurred, and no copying was done.
The source and destination directory trees are completely synchronized.
so if both source and destination do not exist so no copying is done, maybe it returns 0 ! So all we can do is a separate exists test on the directory
I notice that the line below in the log (which is a fallacy as logged) suggests to me that Robocopy might have returned a 4? (I'm not sure which side was substituted from errorlevel).
E:\Jenkins\workspace\_releases_pipeline_Release_6.0.0\build>if 0 GEQ 4 (
exit /b 1
)
I notice that the line below in the log (which is a fallacy as logged) suggests to me that Robocopy might have returned a 4? (I'm not sure which side was substituted from errorlevel).
E:\Jenkins\workspace\_releases_pipeline_Release_6.0.0\build>if 0 GEQ 4 ( exit /b 1 )
No, it's the other side, we're checking if the errorlevel is greater than 4. So it is actually returning a 0, which is incorrect.
As a developer I would like to know when IBEX_GUI fails to deploy to the share. This should be a failed build. When building release 6.0.0 I got the following output:
Various copies have clearly failed but the errorlevel has remained at zero and so the build succeeded.