是的,您可以使用现有的动态视图。
原理是:
- 在您的 Hudson(主)服务器上创建动态视图
- 在 Hudson 作业配置中指示您想要使用现有的动态视图(您必须输入其根路径:
/view/yourView
)
- 让 Hudson 监视自上次运行以来发生变化的文件(它将通过查询该动态视图中的文件历史记录来实现)
当然,您将需要ClearCase 插件 http://wiki.hudson-ci.org//display/HUDSON/ClearCase+Plugin首先要安装。
这是一个插图(完整的强制手绘圆圈 https://meta.stackexchange.com/questions/19478/the-many-memes-of-meta/19775#19775)此类作业的配置如下:
替代文本http://img405.imageshack.us/img405/3261/jobhudsoncc2.png http://img405.imageshack.us/img405/3261/jobhudsoncc2.png
(注意:M:\myView 而不是 /view/MyView:这是因为我在 Windows7 笔记本电脑上制作此示例)
“使用现有动态视图”的文档提到:
如果设置,Hudson 将使用现有的动态视图而不是创建快照视图。使用动态视图时,Hudson 的行为会有所不同。它不会创建或删除视图,因此如果启用此选项,“使用更新”配置将被忽略。该插件将在需要时更新视图的配置规范。
要使用此选项,必须使用常见的 ClearCase 工具在 Hudson 外部创建动态视图。如果动态视图不存在,检出将会失败。视图的标签应与“视图名称”字段中指定的相同。
我建议检查该选项不要重置配置规范保留视图的现有配置规范。
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
et type
cleartool lsview -l -full -pro -cview?
可能的错误原因:
-
umask != 2
(type 'umask
' 检查该值,如果与 2 不同,请输入 'umask 2
')
- 所有者不是维杰姆
- 运行 Hudson 的进程组不是 vob 组之一(检查/设置运行该进程的用户的主要组:'
id -a
'
解决方案:重置该视图的保护(确保我们的路径引用/usr/atria/etc/utils
, where fix_prot
is)
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