是的,您可以使用现有的动态视图。
原理是:
- 在您的 hudson(主)服务器上创建动态视图
- 在 Hudson Job 配置中指明您要使用现有动态视图(您必须输入其根路径:
/view/yourView)
- 让 hudson 监控自上次运行以来演变的文件(它将通过在该动态视图中查询文件的历史记录来做到这一点)
当然,您需要先安装ClearCase plugin。
下面是这样一个 Job 的配置示例(完整的 mandatory Freehand Circles):
alt text http://img405.imageshack.us/img405/3261/jobhudsoncc2.png
(注意:M:\myView 而不是 /view/MyView: 那是因为我是在我的 Windows7 笔记本电脑上制作这个示例)
“使用现有动态视图”的文档提到:
如果设置,Hudson 将使用现有的动态视图而不是创建快照视图。使用动态视图时,Hudson 的行为会有所不同。它不会创建或删除视图,因此如果启用此选项,则会忽略“使用更新”配置。该插件将在需要时更新视图的配置规范。
要使用此选项,必须使用通用 ClearCase 工具在 Hudson 外部创建动态视图。如果动态视图不存在,检出将失败。视图的标签应与“视图名称”字段中指定的相同。
我建议选中 Do Not Reset Config Spec 选项以保留视图的现有配置规范。
workspace] $ cleartool setcs -tag vijaym_SNDBX_INT_View -stream
cleartool: Error: Unable to change configuration specification: Permission denied.
FATAL: UCM ClearCase failed. exit code=1
这意味着对这个视图的保护在某种程度上是错误的:
你能在/view/vijaym_SNDBX_INT_View 等类型的服务器上继续吗
cleartool lsview -l -full -pro -cview?
可能的错误原因:
-
umask != 2(输入'umask'检查值,如果不是2,输入'umask 2')
- 所有者不是 vijaym
- 运行 Hudson 的进程组不是 vob 组之一(检查/设置运行该进程的用户的主要组:'
id -a'
解决方案:重置该视图的保护(确保我们的路径引用/usr/atria/etc/utils,其中fix_prot 是)
cd / # leave the view
cleartool endview -server vijaym_SNDBX_INT_View # stop completely the view
cleartool umount -all # make sure all vobs are unmounted
# reset protections
fix_prot -force -rec -chown vijaym -chgrp aCorrectGroup -chmod 775 /path/to/vijaym_SNDBX_INT_View.vws
fix_prot -force -root -chown vijaym -chgrp aCorrectGroup /path/to/vijaym_SNDBX_INT_View.vws
#restart the view and mount the vobs
cleartool startview vijaym_SNDBX_INT_View
cleartool mount -all
# check if the protections are ok
cd /view/vijaym_SNDBX_INT_View
cleartool lsview -l -full -pro -cview