我想在本地运行jenkins上的机器人框架。当我在本地运行机器人框架时,它工作得很好,但是当我试图用Jenkin运行它时,它根本不起作用,并且出现此错误。 (使用的是Mac)jenkins上运行的机器人框架
Started by user Masnad Nehith
Building in workspace /Users/Shared/Jenkins/Home/workspace/test-robot-framework
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url https://github.com/nihitx/robot-framework-with-jenkins.git # timeout=10
Fetching upstream changes from https://github.com/nihitx/robot-framework-with-jenkins.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials githubpass
> git fetch --tags --progress https://github.com/nihitx/robot-framework-with-jenkins.git +refs/heads/*:refs/remotes/origin/*
> git rev-parse refs/remotes/origin/master^{commit} # timeout=10
> git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 5a0db902b380bacf39ffc42eb7337f62f4c59b00 (refs/remotes/origin/master)
Commit message: "new push"
> git config core.sparsecheckout # timeout=10
> git checkout -f 5a0db902b380bacf39ffc42eb7337f62f4c59b00
> git rev-list dda0a775c15f953f2f80a6a4abdf484c333b8000 # timeout=10
[test-robot-framework] $ /bin/sh -xe /Users/Shared/Jenkins/tmp/jenkins5706735847575370647.sh
+ robot -d results -v inputEmail:[email protected] tests/Aurora.robot
/Users/Shared/Jenkins/tmp/jenkins5706735847575370647.sh: line 2: robot: command not found
Build step 'Execute shell' marked build as failure
Robot results publisher started...
-Parsing output xml:
Failed!
/Users/Shared/Jenkins/Home/workspace/test-robot-framework/Results does not exist.
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:460)
at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:72)
at hudson.plugins.robot.RobotParser$RobotParserCallable.invoke(RobotParser.java:54)
at hudson.FilePath.act(FilePath.java:998)
at hudson.FilePath.act(FilePath.java:976)
at hudson.plugins.robot.RobotParser.parse(RobotParser.java:49)
at hudson.plugins.robot.RobotPublisher.parse(RobotPublisher.java:217)
at hudson.plugins.robot.RobotPublisher.perform(RobotPublisher.java:239)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:730)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676)
at hudson.model.Build$BuildExecution.post2(Build.java:186)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621)
at hudson.model.Run.execute(Run.java:1760)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:415)
Finished: FAILURE
我明白那是什么詹的找不到机器人命令,但我加入了机器人文件到我的电脑的本地bin目录。
看起来像一个路径问题。你为什么不与机器人可执行文件的绝对路径试试吗?只是为了得出结论,这是唯一的道路问题。 – Waman
@Waman我固定的路径问题,但现在,我得到一个权限被拒绝的问题。我使用的是Mac –
只需要设置如果非root用户或root身份运行权许可..应该可以解决权限问题是好.. – Waman