We are trying to automate our builds and I have set up Jenkins for this. I have created an 'Item' in jenkins which checks out the latest version from SVN and then builds 3 uVision projects which is part of the checked out code.
The checkout works fine but the builds fail in a strange way. There are 3 seperate .uvprojx files. From a clean check out only the first one builds, the second one fails which results in the 3rd one from being built.
However if I then change Jenkins to build only (and not do a clean check out) then the first and second build ok, with the 3rd failing. If i build once more all 3 then build successfully.
To do each of the builds I am using the Jenkins option 'Execute Windows Batch Command' with the following command (There is a seperate Batch command for each of the 3 projects)
cd %WORKSPACE%\STM32F0\Master\ C:\Keil_v5\UV4\UV4 -cr Master.uvprojx -t "STM32F072RB-Nucleo"
This is the output I am getting:
[NextGen Prototype] $ cmd /c call C:\Windows\TEMP\jenkins4040131672691026528.bat C:\Jenkins\Workspace\NextGen Prototype>cd C:\Jenkins\Workspace\NextGen Prototype\STM32F0\Master\ C:\Jenkins\Workspace\NextGen Prototype\STM32F0\Master>C:\Keil_v5\UV4\UV4 -b Master.uvprojx -t "STM32F072RB-Nucleo" C:\Jenkins\Workspace\NextGen Prototype\STM32F0\Master>exit 0 [NextGen Prototype] $ cmd /c call C:\Windows\TEMP\jenkins3035909669084931824.bat C:\Jenkins\Workspace\NextGen Prototype>cd C:\Jenkins\Workspace\NextGen Prototype\STM32F0\SAT1\ C:\Jenkins\Workspace\NextGen Prototype\STM32F0\SAT1>C:\Keil_v5\UV4\UV4 -b Satellite1.uvprojx -t "STM32F072RB-Nucleo" C:\Jenkins\Workspace\NextGen Prototype\STM32F0\SAT1>exit 1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE
I also cannot work out how to get more information to explain what has actually failed! Is this a Jenkins or uVision thing?
If I build these within the uVision IDE there are no problems.
So the question is how come the 2nd and 3rd projects only build after successive executions of the same build step?
Do you have your listings and/or objects in separate folders?
www.keil.com/.../uv4_ca_spec_seprte_fldr.htm
uVision normally creates these folders automatically if they don't exist - could it be that your Jenkins setup doesn't (quite) have the right permissions for this ... ?
Hi Andrew, No this was not the problem, but thanks for the idea.
In the end it turned out that my first project builds without any warnings, whereas the other 2 both have warnings. Jenkins was treating this ERRORLEVEL value (1) as a failure.
Therefore I have added ERRORLEVEL value of 1 to the unstable setting so it now works.
Hi
We have the exact same problem, Jenkins treats Errorlevel 1 as a failure, we would like Jenkins to ignore lower Errorlevels. O don't know what you mean by "unstable", can you explain?
Regards
Walter