I have setup Jenkins and am unable to run some my script, I now have to run some 'winds batch script'.I gave command mvn exec:java -Dexec.mainClass="test.automation.framework.Runner",but i am getting error,Can some one please help me on dis?

207 views
Skip to first unread message

molletia...@gmail.com

unread,
Nov 9, 2018, 9:51:33 AM11/9/18
to Jenkins Users
Commit message: "latest changes in schoolmanager class file"
 > /opt/bitnami/git/bin/git rev-list --no-walk 9ff69e6ef1d74435fa66ef3f7f540a0249e2085e # timeout=10
[qa-automation] $ cmd /c call /opt/bitnami/apache-tomcat/temp/jenkins7539709996486040665.bat
FATAL: command execution failed
java.io.IOException: error=2, No such file or directory
	at java.lang.UNIXProcess.forkAndExec(Native Method)
	at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)
	at java.lang.ProcessImpl.start(ProcessImpl.java:134)
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
Caused: java.io.IOException: Cannot run program "cmd" (in directory "/opt/bitnami/apps/jenkins/jenkins_home/workspace/qa-automation"): error=2, No such file or directory
	at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
	at hudson.Proc$LocalProc.<init>(Proc.java:249)
	at hudson.Proc$LocalProc.<init>(Proc.java:218)
	at hudson.Launcher$LocalLauncher.launch(Launcher.java:929)
	at hudson.Launcher$ProcStarter.start(Launcher.java:449)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:109)
	at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:66)
	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
	at hudson.model.Build$BuildExecution.build(Build.java:206)
	at hudson.model.Build$BuildExecution.doRun(Build.java:163)
	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
	at hudson.model.Run.execute(Run.java:1794)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
	at hudson.model.ResourceController.execute(ResourceController.java:97)
	at hudson.model.Executor.run(Executor.java:429)
Build step 'Execute Windows batch command' marked build as failure
Archiving artifacts
Finished: FAILURE

Mark Waite

unread,
Nov 9, 2018, 9:55:24 AM11/9/18
to jenkins...@googlegroups.com
You're trying to run a Windows batch command on a Linux agent.  That won't work.  

If a Windows batch command is required, then you will need to use an agent on a Windows computer.  Pipeline jobs usually control the agent they use based on a label.  Freestyle and other jobs do the same.

Mark W

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/88164238-e30a-4d29-86a0-26ff32ac91cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Thanks!
Mark Waite

RAJENDRA PRASAD

unread,
Nov 9, 2018, 10:27:23 AM11/9/18
to jenkins...@googlegroups.com
Come again....,
You want to run wind batch script? Do you mean windows batch script on Jenkins?

If that is true , you cannot do that on Unix machine.

It looks Jenkins is running on Unix machine.

-Rajendra


--
Reply all
Reply to author
Forward
0 new messages