Select Page

This is will be a list of bugs that i found or mistakes that i do


  1. Pipeline that simply copied from one job to another. In pipeline was included ‘bat’ section. In first job result was success, but in second we had a Failure status. Command execute correct but return Failure status. We even compare xml files of those jobs, no differences. What helps: Recreate job. after that all works good
  2. If Jenkins had a very complex structure, increases percentage of bugs. For example if you have http://your-jenkins/folder1/folder2/folder3/folder4/jobs, and etc Jenkins can not open folder2, he just return “Cannot open this page” mess.
  3. Windows. If you want execute for example ‘C:/Program Files (x86)/path/to/file.exe’ file in groovy pipeline using bat command you can get error ‘C:/Program ‘  Path not found or  ‘C:/Program ‘ File not found. That because you have extra spaces between words. In this case you should use double quotes for this variable:
    env.MSBUILD="C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Professional\\MSBuild\\15.0\\Bin\\MSBuild.exe"
    bat ' "%MSBUILD%" %SLN_FILE% /t:Rebuild /p:Configuration=Release /p:Platform=x64 /m'
  4. We have bug with conversion from XML to JSON in powershell. We use “ConvertTo-Json” cmdlet. but got exception that didn’t tell anything interesting. After investigation we realize that it’s a known powershell issue with XML syntax. For example XML ” <tastcase message=”Some not interesting text “\{Another text }\””> ” get error. It’s because powershell version 4 cannot convert this symbols ” \}” “. In this case you should add flag “-Compress” or update powershell to version 5
  5. We have groovy scripted pipeline that called bash script that called another bash script inside. And second bash script return error code that is good and important for first bash script and just tell that need to execute another process. But pipeline catch this error code and got status “FAILURE”. In this case you should add “set +e” in bash script, that mean continue execute script if you got some errors. In bash, set +e: If you get an error in a bash script, it normally barfs out an error to the system (this is called an exit code) but the script will continue running.