Question

I am looking for a plugin or extension, which can be used to create clearcase dynamic view using Jenkins. The existing clearcase plugin gives this functionality for snapshot view only. This post also gives an idea of using script for creating CC view.

Has somebody done/doing similar work? That will be nice if I can get some ideas how to proceed further. It should be for base clearcase, not for UCM.

Was it helpful?

Solution

Create, maybe not.

But the ClearCase plugin allows for using an existing dynamic view.

https://wiki.jenkins-ci.org/download/attachments/2916537/base_dynamic_config.png?version=1&modificationDate=1252688398000

Optionally, you can use an existing dynamic view, rather than a new snapshot view. To do so, check "Use dynamic view" under the advanced options.

View root

Required for dynamic view use - this is the directory or drive under which dynamic views live. On Unix, this is generally "/view", while on Windows, it's generally "M:\".

Do Not Reset Config Spec

If selected, the dynamic view's config spec won't be changed, regardless of whether it matches the config spec specified in the job configuration.


The plugin itself creates snapshot view in hudson.plugins.clearcase.ClearToolExec class.
You can use a similar code for dynamic view.

OTHER TIPS

This question is a bit old now so you have probably moved on and found a solution, but this might be useful for someone else looking for the answer. We use Jenkins on Windows and create dynamic views on the fly, using a CreateView.bat script:

echo Usage: CreateView.bat CLEARCASE_ROOT(e.g. M:) VIEW_NAME REGION [CONFIG_SPEC(Latest)] [ENABLE_WINKIN(true)]
SET CLEARCASE_ROOT=%1
SET VIEW_NAME=%2
SET REGION=%3
SET CONFIG_SPEC=Latest
if NOT "%4"=="" SET CONFIG_SPEC=%4
SET WINKIN=n
if /I "%5"=="true" SET WINKIN=

echo Creating new view at %CLEARCASE_ROOT%\%VIEW_NAME% on %COMPUTERNAME% with Config Spec %CONFIG_SPEC% in Region %REGION%
if "%WINKIN%"=="n" (echo WINKIN IS DISABLED ON THIS VIEW) else (echo WINKIN IS ENABLED ON THIS VIEW)

cleartool mkview -tag %VIEW_NAME% -region %REGION% -%WINKIN%shareable_dos \\%COMPUTERNAME%\views\%VIEW_NAME%.vws
cd /d %CLEARCASE_ROOT%\%VIEW_NAME%
if /I NOT "%CONFIG_SPEC%"=="latest" cleartool setcs %CLEARCASE_ROOT%\%VIEW_NAME%\CMAdminVOB\config-specs\%CONFIG_SPEC%
cleartool catcs

We typically call this with something like:

call D:\BuildTools\ClearCase\CreateView.bat M: my_view_name vpd_my_region my_config_spec true

You can probably adapt the above to suit your needs

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top