如何从 KornShell 脚本在 Hudson 中访问动态视图?
使用 Clearcase Dynamic 视图,Hudson 的作业日志显示 cleartool
的 lsview
、startview
和 lshistory
命令均成功.
但是,后续构建脚本 (SunOS KornShell (ksh)) 无法访问视图的目录。
运行“cleartool pwv”而不是 shell 脚本会产生:
Working directory view: ** NONE **
Set view: ** NONE **
这确认了 Hudson 调用的 shell 似乎在它自己的世界中运行。
这是正确的 Hudson 行为还是我们配置错误?
PS ksh 脚本可以调整,但它是我们必须保留的遗留内容之一。
Using a Clearcase Dynamic view, Hudson's job log shows cleartool
's lsview
, startview
and lshistory
commands are all successful.
However, the subsequent build script (SunOS KornShell (ksh)) fails to access the view's directories.
Running "cleartool pwv" instead of the shell script yields:
Working directory view: ** NONE **
Set view: ** NONE **
Which confirms that the Hudson-invoked shell appears to running in it is own world.
Is this the correct Hudson behavior or have we configured it incorrectly?
P.S. the ksh script can be tweaked, but it is one of those legacy things we have to keep.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您希望cleartool pwv返回视图,则需要确保您的脚本将使用视图路径(对于动态视图为
/view/myDynamicView
)自行执行。我建议在 Hudson 作业中使用现有的动态视图。
我不会在您的脚本中使用像
/vobs/aVob/.../
这样的路径,因为/vobs
是为一个设置的安装点(只有一个)动态视图。并且您的脚本可能没有设置所述动态视图(到/vobs
,请参阅cleartool setview
)。使用完整绝对路径更加稳健。(注意:我不知道您的脚本是否使用此快捷方式,但我只是在这里提及以全面涵盖此主题)
If you want
cleartool pwv
to return a view, you need to make sure your script will execute itself with a view path (/view/myDynamicView
for dynamic views).I recommend using an existing dynamic view in your Hudson job.
I wouldn't use in your script a path like
/vobs/aVob/.../
because/vobs
is a mounting point (only one) to be set for one dynamic view. And your script might not have set said dynamic view (to/vobs
, seecleartool setview
). Using the full absolute path is more robust.(Note: I don't know if your script use this shortcut, but I just mention here to cover fully this topic)