Dynamic views of ClearCase not integrating in Jenkins

烈酒焚心 提交于 2019-12-08 09:48:45

问题


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.

My Commands at Execute Shell:

/usr/atria/bin/cleartool setview johns 
/usr/atria/bin/cleartool catcs
cd /vob1/pts/
ls
pwd
  • 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 ... like pwd and ls.

回答1:


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)

Always use the full path of the view: /view/yourView/vobs/yourVob

In your case:

cd /view/johns/vobs/pts
/usr/atria/bin/cleartool catcs
ls
pwd

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 

(with /tmp/script.sh including all your other commands)



来源:https://stackoverflow.com/questions/23515538/dynamic-views-of-clearcase-not-integrating-in-jenkins

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!