1

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.
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Suresh Kumar
  • 71
  • 1
  • 2
  • 3

1 Answers1

0

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)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Could you please give an example for my Queries or change what I need to do for my settings as I mentioned in my Query. I am new to Jenkins integration, I stuck at first instance itself. You can take my view and vob as examples. Thanks Von! – Suresh Kumar May 07 '14 at 10:57
  • @SureshKumar Are you using https://wiki.jenkins-ci.org/display/JENKINS/ClearCase+Plugin? – VonC May 07 '14 at 10:59
  • Yes, I installed ClearCase plugin and using it. I tried setting view in different ways. All were failed. – Suresh Kumar May 07 '14 at 11:08
  • Thanks a lot. It worked well! cd /view/johns/vob1/pts. – Suresh Kumar May 08 '14 at 13:43
  • @SureshKumar yes, using the full path of a view is always better than trying to "setview" it. – VonC May 08 '14 at 13:44