0

I am doing automated deployemnt in jenkins and getting error saying that: Build step 'Execute Windows batch command' marked build as failure.

Building on master in workspace:

C:\Program Files (x86)\Jenkins\workspace\AutomatedDeployement1
[AutomatedDeployement1] $ cmd /c call C:\Windows\TEMP\jenkins1993620515430909066.bat

C:\Program Files (x86)\Jenkins\workspace\AutomatedDeployement1>date
The current date is: 08-06-2020 
Enter the new date: (dd-mm-yy) 
C:\Program Files (x86)\Jenkins\workspace\AutomatedDeployement1>exit 1 
Build step 'Execute Windows batch command' marked build as failure
[DeployPublisher][INFO] Build failed, project not deployed
Finished: FAILURE

Your answer will help me in learning. Thanks In advance

Arturo
  • 3,254
  • 2
  • 22
  • 61

1 Answers1

0

The "marked build as failure" message happens because of the exit code in your batch file. Try exit 0 instead of exit 1.

You can also instruct Jenkins to continue building even though there was a build error.

EpicVoyage
  • 604
  • 7
  • 20