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
288 views

1 answer to this question.

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
• 37,320 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,870 points
199 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,240 points
36 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 Jun 20 in Jenkins by Arvind
• 1,530 points
53 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
• 37,320 points
752 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
• 37,320 points
800 views