Is there a way to make the Jenkins CI server ignore certain errors?
In a project I need to run cmake several times to make it succeed (I cannot change that). In the first and second run errors might occur, which I would like to ignore.
Is it possible to configure the build in jenkins in such a way?
While I agree with the others that it seems like there is a problem with your build process in general, there is a way to workaround it [until it is fixed].
For each cmake call, use a separate build step that executes a shell (or Windows batch file, depending on your environment). For the first two, you should have two lines
The first will execute your cmake. The second sets the return value that Jenkins will look at. Returning a 0 tells Jenkins that there were no failures.
For the last one, you don’t want to the exit 0, since you want any errors caught.
Update: I ran into a situation where Jenkins would abort a shell script on the first line that returned non-zero. The solution I found was actually pretty simple. Put the “exit 0” on the same line as the command that caused the non-zero result.