1

We are using base clear case with dynamic views on Linux. In our environment some custom script is responsible, so ct mkview is not working. I need either - provide to Hudson plugin a custom script for creating a view - tell to plugin to reuse existing view, w/o calling to ct mkview

I did not find any of these options.

Can you help me?

Here are my current settings:

alt text

Thank you

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Pavel Bernshtam
  • 4,232
  • 8
  • 38
  • 62

1 Answers1

1

As I have detailed in "Hudson integration with UCM ClearCase", you can use an existing dynamic view, even if it is non-UCM.
You need to click on "Advanced Options" to access to that part.

That being said, make sure the user associated with the Hudson session is registered in the right groups (primary or secondary groups of the Vobs that account needs to access) in order to be able to read (even checkout) files in said Vobs.


Turns out the OP did have the right Hudson ClearCase plugin, did access the "Advanced Options" part, but:

  • "Use dynamic view" option
  • and the "Let Hudson manage the view lifecycle".

That second option isn't needed when you have a dynamic view already created (outside of Hudson), and if you want that view to be reused as is.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I do not see an option "Use existing dynamic view" in my hudson (last version, Base CC) :( – Pavel Bernshtam Jan 16 '11 at 14:50
  • @user20391: Even by clicking on "Advanced Option"? What is the last field you see in the job setting page? – VonC Jan 16 '11 at 15:41
  • Under "use dynamic views": View root Let Hudson manage the view lifecycle Windows dynamic view storage directory Unix dynamic view storage directory Use time rule in config spec Do Not Reset Config Spec – Pavel Bernshtam Jan 16 '11 at 15:44
  • user20391: so... in other word, you don't have the Hudson ClearCase plugin installed (http://wiki.hudson-ci.org/display/HUDSON/ClearCase+Plugin), and that might explain your issue. – VonC Jan 16 '11 at 20:01
  • @user20391: ok, you do have the right plugin, and you did select the "reuse dynamic view". But it isn't working, right? – VonC Jan 17 '11 at 07:21
  • @user20391: wait-wait-wait... are you using an *Unix* view (with a *Unix* view storage path) from a *Windows* ClearCase client? Because, Hudson or not, I never managed to do that. I would recommend re-using an existing *Windows* view, not an Unix one. – VonC Jan 17 '11 at 07:25
  • I'm not using windows client or windows something. I just run my chrome browser on windows – Pavel Bernshtam Jan 17 '11 at 12:33
  • @user20391: ok, but you did specify a Windows-like UNC style path in the "Windows dynamic view storage directory" field. I would recommend leaving that field empty. – VonC Jan 17 '11 at 12:48
  • @user20391: plus, I suspect the unix view storage directory is not '/view': '/view' is the mount point for dynamic view. You need to indicate where `your-view.vws` directory is located. – VonC Jan 17 '11 at 12:52
  • All changes made: Windows path empty and Unix path points to teh correct dir. Still it tries to remove and create again the view :( – Pavel Bernshtam Jan 17 '11 at 15:13
  • @user20391: what happen if you only select "use dynamic view" without selecting the other option ("Let Hudson manage...")? – VonC Jan 17 '11 at 16:56
  • @user20391: perfect, I have included that conclusion in my answer. – VonC Jan 18 '11 at 08:20
  • Sorry can I ask you what you are meant in the box "View path" ? – 7dr3am7 Jan 19 '12 at 13:51
  • 1
    @7dr3am7 it is the path within the Hudson workspace, as in `G:\hudson\workspace\myjob\myuser_mynode_myjob`. See issue 6227 http://issues.hudson-ci.org/browse/HUDSON-6227 for more details on that field. – VonC Jan 19 '12 at 16:33
  • thank you @VonC! BTW, I have set everything up, but the plugin seems to start the view as in the command is cleartool startview rather than cleartool setview , is there anything I can do to *set the view* ? – 7dr3am7 Jan 19 '12 at 18:08
  • @7dr3am7: `setview` shouldn't be necessary, unless you are on Unix and insist on accessing your view through `/vob/yourVob/...`. It is best to strat the view and access it through its path for dynamic view: `/view/yourView/yourVob/....` – VonC Jan 19 '12 at 19:42
  • ehm, I kinda really need to set the view. how can I go about doing that? – 7dr3am7 Jan 19 '12 at 21:16
  • @7dr3am7: then it is best to do this step (the `setview`) in the script associated with the job starting the view: the first line of that script can set the view, and the rest of the script can go on using a standard fixed path of `/vobs/aVob/...`. – VonC Jan 19 '12 at 22:01
  • @VonC: Do you mean a build step? I have tried to call it but I had no luck, :( I will keep trying – 7dr3am7 Jan 20 '12 at 11:03
  • @7dr3am7: what error message did you get when making the `setview` during a build step? – VonC Jan 20 '12 at 11:31
  • @VonC: no errors what so ever... so this is what the build step looks like: /opt/clearcase/bin/cleartool setview and after I do a simple ls to the folder containing a file build ls /vob/aVob/build.xml – 7dr3am7 Jan 20 '12 at 11:47
  • no it doesn't.... that is just weird, I even tried to redirect the output to a file to check wheter it comes out with a failure code or anything.... but nothing! :(( – 7dr3am7 Jan 20 '12 at 18:56
  • @7dr3am7 So maybe the view isn't started yet at this point? Or it is, but the vob isn't mounted yet? – VonC Jan 20 '12 at 21:08
  • @VonC, tbh I do not know... It should have worked but,yes, the ls fails at finding a file under the vob, do you know if it is possible to setview in the CC plugin? I even scanned their source code with no luck... – 7dr3am7 Jan 21 '12 at 17:49
  • @7dr3am7 `setview` is possible from any environment: see http://publib.boulder.ibm.com/infocenter/cchelp/v7r0m0/index.jsp?topic=/com.ibm.rational.clearcase.cc_ref.doc/topics/ct_setview.htm. Your view needs to be a dynamic one of course, but I think what got you is that `setview` **creates a subprocess**: you need to use the `-exec` option in order to `setview` *and* to execute a script (which would, for instance, make the `ls` you wanted) – VonC Jan 21 '12 at 22:51
  • I see, but isn't a bit unusual? for example, when you set the view the content of the vob should be mounted under /a/vob/ but in that case failed. I was reading the release notes and apparently they replaced setview with startview (Clearcase plugin) – 7dr3am7 Jan 22 '12 at 19:32
  • @7dr3am7: because of that subprocess thing, using `setview` just to get a common path isn't worth it. Better to start the view, and access it through `/view/aView/avob`. However, don't forget to check if that vob is mounted though: that could be your other issue explaining the failed `ls`: an unmounted vob isn't accessible, `startview`or `setview`. – VonC Jan 22 '12 at 21:38
  • no the vob is mounted and accessible... :( oh well then maybe I sould go for startview BUT how come that they had setview before? – 7dr3am7 Jan 22 '12 at 22:32