问题描述
我们使用ClearCase作为我们的版本控制工具.在我在Execute Shell的工作中将动态视图集成到Jenkins时,它没有集成并引发错误.
We use ClearCase as our Version Control Tool. While Integrating Dynamic view to Jenkins in my job at Execute Shell, it is not getting integrated and throwing errors.
我在Execute Shell上的命令
My Commands at Execute Shell:
/usr/atria/bin/cleartool setview johns
/usr/atria/bin/cleartool catcs
cd /vob1/pts/
ls
pwd
- 首先,它不是标识
cleartool
路径和视图. - 其次,它没有进入VOB(
/vob1/pts
).
没有一个命令可以正常工作,例如pwd
和ls
. - First thing, it is not identifying the
cleartool
path and view. - Secondly, it is not entering into VOB (
/vob1/pts
).
None of the commands working ... likepwd
andls
.
推荐答案
请勿使用cleartool setview
(正如我在答案):它产生一个子外壳,该外壳使任何后续命令均不起作用(因为这些命令是在 parent 外壳中执行的,为此/vobs
分配了该外壳)
Don't use cleartool setview
(as I mention in this answer): it spawns a sub-shell which makes any subsequent command not working (because those commands are executed in the parent shell, for which /vobs
has been assigned to a view)
始终使用视图的完整路径:/view/yourView/vobs/yourVob
在您的情况下:
cd /view/johns/vobs/pts
/usr/atria/bin/cleartool catcs
ls
pwd
如果Jenkins ClearCase插件仍在使用setview,则按照此博客帖子,您必须确保它使用了-exe
指令:
If the Jenkins ClearCase Plugin is using setview anyway, then, as explained in this blog post, you must make sure it uses a -exe
directive:
cleartool setview -exec /tmp/script.sh
(带有/tmp/script.sh
包括所有其他命令)
(with /tmp/script.sh
including all your other commands)
这篇关于未在Jenkins中集成ClearCase的动态视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!