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

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

Thu Nov 08, 2018 10:19 am

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: 6544
Joined: Wed Jun 13, 2018 7:49 am

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

Thu Nov 08, 2018 2:07 pm

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

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

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

Sun Nov 18, 2018 7:27 am

thank you for you help :)

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

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

Mon Nov 19, 2018 9:06 am

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”