未在Jenkins中集成ClearCase的动态视图

未在Jenkins中集成ClearCase的动态视图

本文介绍了未在Jenkins中集成ClearCase的动态视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们使用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).
    没有一个命令可以正常工作,例如pwdls.
    • 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.
    • 推荐答案

      请勿使用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的动态视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 20:03