2012-02-20 66 views
2

目前我的詹金斯设置仅限于一个执行者。这几乎是我们构建的要求,因为我们有一个用户特定的日志文件,每个构建都会创建一个。为了获得多个执行者,我只是在本地机器上设置了slave。我想让所有的奴隶共享相同的工作区,所以我只创建了一个符号链接。这就是说,我必须在工作空间中调用775,以便更多地使用基于组的工作空间。无论如何有多个詹金斯奴隶共享一个工作区?詹金斯与多个奴隶使用同一台机器

编辑:关于我的1执行者限制。我们的应用程序是一个动作的应用程序,我们有很多的,我们的生成过程中运行,并创建闪存日志的单元测试。我们希望能够为每个构建提供Flash日志。 unix上的闪存日志存储在用户主目录中。从版本10.1开始,您无法更改mm.cfg中的位置。由于詹金斯运行作为用户,我们不能在同一时间运行的FlexUnit测试多个实例,并能够正确地捕捉闪存日志。

下面是一些烫发失败我越来越:

Fetching upstream changes from [email protected]:repo/repo.git 
ERROR: Problem fetching from origin/origin - could be unavailable. Continuing anyway 
hudson.plugins.git.GitException: Error performing command: git fetch -t [email protected]:repo/repo.git    
+refs/heads/*:refs/remotes/origin/* 
Command "git fetch -t [email protected]:repo/repo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: error: insufficient permission for adding an object to repository database .git/objects 

fatal: failed to write object 
fatal: unpack-objects failed 

at hudson.plugins.git.GitAPI.launchCommandIn(GitAPI.java:776) 
at hudson.plugins.git.GitAPI.launchCommand(GitAPI.java:741) 
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:190) 
at hudson.plugins.git.GitAPI.fetch(GitAPI.java:978) 
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:765) 
at hudson.plugins.git.GitSCM.access$100(GitSCM.java:80) 
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1003) 
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:970) 
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2045) 
at hudson.remoting.UserRequest.perform(UserRequest.java:118) 
at hudson.remoting.UserRequest.perform(UserRequest.java:48) 
at hudson.remoting.Request$2.run(Request.java:287) 
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) 
at java.util.concurrent.FutureTask.run(FutureTask.java:138) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 
at java.lang.Thread.run(Thread.java:619) 

造成的:hudson.plugins.git.GitException:命令“混帐取-t混帐@公司:回购/ repo.git +裁判/头/ :裁判/遥控器/产地/“返回状态代码128:错误:将对象添加到库数据库git的权限不足/对象

+1

你能否详细解释为什么你必须有一个执行者 - 这里的人可能能够帮助你克服这个限制。 – 2012-02-20 04:46:41

+0

我编辑了原帖 – gdoubleod 2012-02-20 09:11:18

+1

_ unix上的flash日志存储在用户主目录中_ 如果主目录的位置取自$ HOME env。变量您可以尝试调用您的测试之前,将其设置为别的东西(由BUILD_ID键控例如临时位置)。 – 2012-02-20 09:44:34

回答

1

更新:这个答案是不正确,请参见注释。

转到节点配置为每个奴隶(http://[jenkins_server]/computer/[slave_name]/configure),并设置远程FS根主目录的价值。 的主目录可以通过http://[jenkins_server]/configure被发现。万一点击下主目录高级按钮,并确保工作区根目录被设置成类似${ITEM_ROOTDIR}/workspace(因为奴隶会在[Remote FS root]/workspace创建自己的工作区)。

这就是说,我不能保证你不会遇到各种各样的问题,试图从同一工作区中的各种从属设备运行作业。

+0

我不知道这会工作,我试图在同一目录设置了我所有的奴隶,有相当,对于奴隶创建了几个jar文件,它似乎有问题,我不得不改变上创建的罐子烫发。至于使用主工作区那是我正在考虑,但布局是不同的,即 主: 工作/ JOB_1 /工作区 /JOB_2 /工作区 /JOB_3 /工作区 奴: slave_dir /工作区/ JOB_1 /JOB_2 /JOB_3 – gdoubleod 2012-02-20 09:26:33

+0

这是我遇到的一些烫发故障 – gdoubleod 2012-02-20 22:32:04

0

我假设你在工作区中存储了一些你想要在构建中持久化/共享的信息。为此,您可能需要考虑使用Copy to Slave Plugin