Same workspace for multiple jobs

房东的猫 提交于 2019-11-28 03:45:38
Dipu H

Suppose your "development" Jenkins job workspace is /var/workspace/job1. In the "code analysis" job configuration page, under the tab General click on Advanced... and select the option Use custom workspace and give the same workspace /var/workspace/job1 as of your "development" job.

There is a Jenkins Plugins which enables you to create a shared workplace a setup them on every job which need the files from that given repository.

Use Case:

Similar to what you need, first create two jobs from the same Git Repository, then go to "Manage Jenkins" and you create a Shared Workspace. And point to it, on every job you need to read from that files.

Jenkins Plugin

https://wiki.jenkins-ci.org/display/JENKINS/Shared+workspace+plugin#


PS: You should look into "Known Issues" could be a deal breaker for your needs.

sometimes, on fresh copied job, shared-space url parameter not saving to config on first "save", you should save job twice to be sure.

^^ This one it's still unresolved, I tried and still happens. After some several saves (just to be sure) the job runs perfectly.

if you were not able to find Use custom workspace you can located it under your project configure>General>Advanced>Use custom workspace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!