zemer
Posts: 7
Joined: Thu Nov 08, 2018 9:58 am

How to get %ERRORLEVEL% for Jenkins based on build command output?

hello,

im building my project using AI cmd inside my jenkins pipeline using :
"AdvancedInstaller.com /build "my project.aip".

how do i catch any error code from AI command line output in order to fail jenkins pipeline build ?
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get %ERRORLEVEL% for Jenkins based on build command output?

Hello Zemer and welcome to our forums,

For example, when the build process is a success, then the return code should be "0". For example, if you try to build a .AIP file using the following command:

Code: Select all

AdvancedInstaller.com /build "D:\SomeAip.aip"
echo %errorlevel%
pause
if the build succeeds, the %errorlevel% will have a value of "0", otherwise it means that the build process fails.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: How to get %ERRORLEVEL% for Jenkins based on build command output?

You're always welcome, Zemer.

I am glad I could help.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”