How can a Dynamic View be accessed in Hudson from a KornShell script?

528 views Asked by At

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.

1

There are 1 answers

8
VonC On BEST ANSWER

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, see cleartool 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)