Jenkins - simply robocopy in Jenkins finishes marks build with failure

0 votes
I’m trying to run a simple robocopy that returns zero errors but when I try to run the same in Jenkins i’m getting the following error.

D:\Jenkins\jobs\Jenkins Config Backup\workspace>exit 1 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE
Aug 6, 2018 in Jenkins by Hannah
• 14,080 points
260 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

robocopy returns a bit map

This is the batch file code I usually use:

set SOURCE= ...
set DESTINATION= ...
robocopy /MIR /LOG:example.robocopy.log.txt %SOURCE% %DESTINATION%
@echo robocopy exit code: %ERRORLEVEL%
@if %ERRORLEVEL% GTR 3 ( echo robocopy ERROR )
@if %ERRORLEVEL% GTR 3 ( exit %ERRORLEVEL% )
@set ERRORLEVEL=0

You could also do a "goto" and not exit.

answered Aug 6, 2018 by Kalgi
• 36,920 points

Related Questions In Jenkins

0 votes
1 answer

Why is it displaying Jenkins build failure for Android app

I think you should try this. Try Uninstalling ...READ MORE

answered Apr 12, 2018 in Jenkins by shubham
• 6,650 points
183 views
+2 votes
5 answers
0 votes
1 answer

sonar XML plugin installation failure in jenkins

You can try this link which SonarQube XML ...READ MORE

answered Jun 20, 2018 in Jenkins by Atul
• 10,220 points
32 views
0 votes
1 answer

How to auto build a job in jenkins if there is any change in code on Github repository?

Yes this is possible. Follow these steps. 1. ...READ MORE

answered 6 days ago in Jenkins by Arvind
• 500 points
18 views
+13 votes
2 answers
0 votes
1 answer
0 votes
1 answer

Jenkins- Build Date in Jenkins Email

Install the zentimestamp plugin. This plugin exports a BUILD_TIMESTAMP variable. ...READ MORE

answered Nov 14, 2018 in Jenkins by Kalgi
• 36,920 points
573 views
0 votes
1 answer

Empty Jenkins Workspace causing Jenkins build failure

/tmp/hudson3579240812233061648.sh: line 3: cd: /jenkins/workspace/completeness_compiler_runtime_tests/TPS/qel/automation/tools The error is ...READ MORE

answered Aug 8, 2018 in Jenkins by Kalgi
• 36,920 points
683 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.