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,090 points
338 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
• 39,390 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,890 points
223 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
41 views
0 votes
2 answers

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

To automatically run build on code commit, follow ...READ MORE

answered Jul 31 in Jenkins by Sirajul
• 19,910 points
103 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
125 views
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
• 39,390 points
1,008 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
• 39,390 points
1,012 views