放置脚本的位置
我为我的 hudson 构建编写了几个脚本。我已将它们放置在我正在从事的特定工作的工作区中。
我希望知道放置脚本的最佳位置。文件系统中的某个地方是最好的地方吗?如果我们移动构建机器怎么办? Hudson 是否指定脚本的位置?
请并谢谢你。
I have written several scripts for my hudson builds. I have place them in the workspace of the particular job i am working on.
I was hoping to know where the best place to put the scripts. Is somewhere in the file system then best place? What if we move build machines? Does hudson designate a place for scripts?
Please and thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我建议将它们放在项目文件夹
/hudson/jobs/MyProject
中,而不是放在工作区中。工作区可能会被覆盖。I would suggest putting them inside your project folder
/hudson/jobs/MyProject
instead of inside the workspace. The workspace could be overwritten.您使用源代码管理吗?如果是这样,你可以把它们放在那里,然后让哈德森把它们从那里拉出来......
Do you use source control? If so you can put them in there and get hudson to pull them from there...
如果这些脚本与特定项目相关,请将它们与该项目捆绑在一起。不要把它们放在其他地方。
如果这些脚本用于多个项目,请将它们作为一个单独的项目放入源代码管理中。每次拉项目时都可以将它们拉下来。如果您的 hudson scm 插件不支持配置两个单独的源(如 subversion 那样),则只需使用 scm 的命令行工具拉取构建脚本作为第一个构建步骤。
构建脚本需要以与代码版本相同的方式进行版本控制。
If these scripts are related to a particular project, bundle them with the project. Don't put them somewhere else.
If these scripts are used for more then one project, put them in your source control as a a separate project. Than you can pull them down every time you pull your project. If your scm plugin for hudson does not support configuring two separate sources (like subversion does), then just pull the build script using a command line tool for your scm as your first build step.
Build scripts need to be versioned the same way as you code is versioned.