Please use the ClearCase UCM Plugin instead.
Archived versions of this plugin remain available for download.

{jenkins-plugin-info:pluginId=PUCM}

A Praqmatic integration to ClearCase UCM - This plugin is renamed and replaced by the 'ClearCase UCM Plugin' - have a look at that instead!

What can Praqmatic UCM do?

Prerequisites:

Limitations

Run Jenkins service under a valid ClearCase account

Jenkins needs to be authenticated by ClearCase, so it's important that you run the Jenkins service under an account that has the sufficient access to ClearCase. PUCM fully supports that a slave can be in a different ClearCase region or even at a completely different ClearCase MultiSite than the master.If you utilize this feature, it's required that the slave is running Jenkins under an account which has the sufficient credential on the remote site

MultiSite - tag your nodes

If you have slaves in different MultiSites than the master, you can tie the jobs that monitors stream that has mastership on foreign sites to slaves that belongs to those sites. A simple strategy for this is that you add a tag to all you slaves telling which MultiSite they belong to and then you tie the jobs to those labeled slaves.

The Source Code Management section setup

When you install the PUCM plugin it will become available as an SCM option in the Source Code Management section. When you build (or poll) PUCM will look for baselines with the given Promotion level on the Stream and within the Component you have given.

Advanced SCM setup

Hidden underneath the "advanced" button is an additional setting:

PUCM general settings

"Nothing to do"

PUCM differs from most other Jenkins SCM plugins in the way it behaves when you push the "Build now" button. Normally an SCM plugin will build something in that situation. Even if the latest commit has already been build, most other SCM plugins will typically just build the latest commit again. But PUCM is different, because it will always match the criteria you have specified (stream, component and promotion level), and there might not always be a baseline that satisfies your requirements - in that case the build will not be built the status "not built".

Build a specific baseline with a parameterized build

If you want a job that builds a specific baseline from ClearCase (e.g. a rebuild), then you can force PUCM to override the Stream, Component and Promotion level settings all together and build a specific named baseline. The way you do this, is simply  to make the job parameterized  (check  'This build is parameterized' in the project options) and set up a String Parameter called pucm_baseline:

You still need to choose the Praqmatic UCM plugin in the Source Control Management section, but when you have an environment variable with the magic name 'pucm_baseline' you don't need to set any of the component, stream or promotion level parameters.

When you build the job, you just need to fill in a fully qualified baseline:

Build Section

During the job execution the baseline being build is stored in the environment variable "cc_baseline".

The view root of the job is located in a directory named view in the jenkins workspace and can directly be referred to as:

#perl style:
${workspace}/view

#Windows shell style:
%WORKSPACE%/view

Post Build Actions

The plugin also offers your some post build actions. These post-build actions will only be invoked if you've selected PUCM as your Source Code management in the pre-build section.

A job will be set to unstable if the any of the options fails to be executed.

Advanced Post Build Actions

PUCM  is capable of deliver the baseline to another stream and create a baseline on that stream. The delivery will only occur on promoted job executions. It's possible to setup a job which has an empty build and only delivers baselines.

UCM deliver - Check this option if you want to use any of the advanced deliver options. You don't necessarily have to specify more details, the deliver can run on default values (described in detail below).

The last level, the sequence, is fetched and automatically incremented from another attribute named:

buildnumber.sequence

which is attached to the component, in which the baseline is found. This attribute should be instantiated with either an integer (or nul) and hereafter it is incremented automatically.
If you specify this option and anyone of these four attributes isn't found as described then the job will become unstable. When using this setting, it's required that the account under which the Jenkins service is running has write access to the buildnumber.sequence attribute attached to the component.

The job will be set to unstable if the delivery is unsuccessful.

Installing Version Attributes

If you choose to use any of the options that use some of our predefined types, then you must create these types as global types in the PVOB(s).
We have created the attributes like this:

 cleartool mkhltype -global -c "Used to support the PUCM plugin, automatically attached to baselines"                                   tag@\Cool_PVOB
 cleartool mkattype -global -c "Used to support the PUCM plugin, attach to UCM projects"        -vtype integer -default 0 buildnumber.major@\Cool_PVOB
 cleartool mkattype -global -c "Used to support the PUCM plugin, attach to UCM projects"        -vtype integer -default 0 buildnumber.minor@\Cool_PVOB
 cleartool mkattype -global -c "Used to support the PUCM plugin, attach to UCM projects"        -vtype integer -default 0 buildnumber.patch@\Cool_PVOB
 cleartool mkattype -global -c "Used to support the PUCM plugin, attach to Top-level component" -vtype integer -default 0 buildnumber.sequence@\Cool_PVOB

If you put them in PVOBs (recommended) you must use the -global switch as above. If you are in a MultiSite environment consider using the -shared switch as well. In general when you create types (any) in a PVOB you should also consider using the -acquire switch too.

To assign the buildnumber.* attributes correct you can either use the ClearCase Project Explorer or use the cleartool CLI, we went:

cleartool mkattr buildnumber.major 0   project:PUCM@\Cool_PVOB
cleartool mkattr buildnumber.minor 3   project:PUCM@\Cool_PVOB
cleartool mkattr buildnumber.patch 20  project:PUCM@\Cool_PVOB
cleartool mkattr buildnumber.sequence  component:_System@\Cool_PVOB

You can set the major, minor, patch and sequence to your your preferences. Notice, that if the attributes has default values, you don't have to specify a value.

Change log

Version 0.3.22(2011-5-5)
Version 0.3.21(2011-4-13)

Issues



Issues regarding PUCM are tracked at jenkins-ci.org please report any issue or feature request you may have there.

Feed-back in general is also welcome, please send us a mail at coolers@praqma.net.