詹金斯无法在MAC奴隶调用Ant [英] Jenkins unable to invoke ANT in MAC Slave

查看:278
本文介绍了詹金斯无法在MAC奴隶调用Ant的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

詹金斯主运行在Windows上。我已经连接的MAC为使用Java Webstart的詹金斯奴隶。我在从站(MAC)安装了ANT和相应更新的路径。我能够把本机上本地运行的蚂蚁程序。

Jenkins master is running on Windows. I have connected a MAC as jenkins slave using java webstart. I have installed ANT in the slave (MAC) and updated PATH accordingly. I am able to run ant programs locally in the slave machine.

当我从詹金斯运行作业,它不调用Ant和失败,下面的错误。
请澄清。

When i run the job from jenkins, It is not invoking ant and fails with below error. Please clarify.

            Building remotely on QAXXX in workspace /Users/uselvvi/jenkins/workspace/QG_LOCALIZATION_STAGING
            Cleaning up /Users/uselvvi/jenkins/workspace/QG_LOCALIZATION_STAGING/.
            Updating https://<SVNRepo>/SVN at revision '2014-03-24T15:55:41.180 -0500'
            At revision 1196
            no change for  https://<SVNRepo>/SVN since the previous build
            [QG_LOCALIZATION_STAGING] $ ant -DLOCALE=en_US -DBROWSER=IE -DENVIRONMENT=QA1 -DSUITE=STAGING RunTestNGSuite
            FATAL: command execution failed.Maybe you need to configure the job to choose one of your Ant installations?
            java.io.IOException: Cannot run program "ant" (in directory "/Users/uselvvi/jenkins/workspace/QG_LOCALIZATION_STAGING"): error=2, No such file or directory
                at java.lang.ProcessBuilder.start(ProcessBuilder.java:1042)
                at hudson.Proc$LocalProc.<init>(Proc.java:244)
                at hudson.Proc$LocalProc.<init>(Proc.java:216)
                at hudson.Launcher$LocalLauncher.launch(Launcher.java:773)
                at hudson.Launcher$ProcStarter.start(Launcher.java:353)
                at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:998)
                at hudson.Launcher$RemoteLaunchCallable.call(Launcher.java:965)
                at hudson.remoting.UserRequest.perform(UserRequest.java:118)
                at hudson.remoting.UserRequest.perform(UserRequest.java:48)
                at hudson.remoting.Request$2.run(Request.java:328)
                at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
                at java.util.concurrent.FutureTask.run(FutureTask.java:266)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
                at hudson.remoting.Engine$1$1.run(Engine.java:63)
                at java.lang.Thread.run(Thread.java:744)
            Caused by: java.io.IOException: error=2, No such file or directory
                at java.lang.UNIXProcess.forkAndExec(Native Method)
                at java.lang.UNIXProcess.<init>(UNIXProcess.java:185)
                at java.lang.ProcessImpl.start(ProcessImpl.java:134)
                at java.lang.ProcessBuilder.start(ProcessBuilder.java:1023)
                ... 15 more
            Build step 'Invoke Ant' marked build as failure
            Archiving artifacts
            Finished: FAILURE

编辑:我使用'调用Ant。相同的设置是Windows奴隶工作的罚款。

I am using 'Invoke ANT'. Same setup is working fine in windows slave.

推荐答案

确定这是我必须做什么..

OK This is what I had to do..

即使保证路径后,ANT_HOME设置正确,我不能让与詹金斯我的默认ANT的工作。我想用'调用Ant。然而,执行壳的方法调用默认的蚂蚁成功地把本机。

Even after ensuring that PATH, ANT_HOME is set correctly, i could not make my default ANT work with Jenkins. I wanted to use 'Invoke Ant'. However, 'Execute shell' method invokes the default Ant successfully in the slave machine.

然后,我不得不使用自动安装选项,在詹金斯下载和在MAC从安装Ant来运行的目标。现在工作得很好。

Then, I had to use the 'Install Automatically' option in Jenkins to download and install Ant in the MAC slave to run the target. It works fine now.

Eventhough我的问题解决了,我仍然好奇,为什么默认没有使用选项调用Ant工作。任何人都知道,请你澄清。

Eventhough my issue is resolved, I am still curious why the default did not work with the option 'Invoke Ant'. Any of you know, please clarify.

感谢大家。

这篇关于詹金斯无法在MAC奴隶调用Ant的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆