简体   繁体   English

Jenkins Slave构建位置

[英]Jenkins Slave build locations

I have just added a slave to my Jenkins build - with the idea that I can now deploy artefacts to either my dev server or my test server. 我刚刚在Jenkins构建中添加了一个从属服务器-的想法是,我现在可以将人工制品部署到我的开发服务器或测试服务器上。 However i've now hit a problem. 但是我现在遇到了一个问题。 When I deploy a job on the master slave, the job build directory is $JENKINS_HOME/localmoduledirectory (as defined in the build job) However when I deploy my job via the slave the build directory is different which breaks my jobs. 在主从服务器上部署作业时,作业构建目录为$ JENKINS_HOME / localmodule目录(在构建作业中定义)。但是,当我通过从服务器部署作业时,构建目录不同,这会中断我的作业。 The build directory is $JENKINS_HOME/workspace/build job title/localmoduledirectory 构建目录为$ JENKINS_HOME / workspace / build职务/ localmoduledirectory

I know I can change the workspace root directory location for the master under configure settings /advances .. so can change it to $JENKINS_HOME/workspace, but I want to stop the slave using the build job title in the path. 我知道我可以在配置设置/ advances ..下更改主服务器的工作区根目录位置,因此可以将其更改为$ JENKINS_HOME / workspace,但是我想使用路径中的构建作业标题停止从属服务器。 The end result I'm after is to have jenkins, building / deploying from the same location on two servers ie /opt/jenkins/workspace/localmoduledirectory. 我追求的最终结果是让jenkins从两个服务器(即/ opt / jenkins / workspace / localmoduledirectory)的同一位置构建/部署。

Any ideas ? 有任何想法吗 ?

ok after lots of head scratching ... managed to discover that the mvn plugin has a custom workspace option hidden under advanced. 确定,经过大量的头部抓挠之后...设法发现mvn插件在高级状态下隐藏了一个自定义工作区选项。 so configured all jobs with a customer workspace of /opt/jenkins. 因此,将所有作业配置为客户工作区为/ opt / jenkins。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM