Question & Answer
Question
How can I create custom promotion levels and attribute types for a IBM® Rational® ClearCase® UCM baseline?
Answer
Create a custom promotion level
Create a custom attribute type
How to create a custom promotion level for a UCM baseline
A promotion level is an attribute of a baseline that can be used to indicate the quality or stability of the baseline.
ClearCase provides the following default promotion levels:
- Rejected
- Initial
- Built
- Tested
- Released
You can use some or all of the default promotion levels, or you can define your own.
Refer to the IBM Rational Managing Software Projects Guide on the topic of Defining promotion levels for more information on Promotion Levels.
There are two ways to create a custom promotion level in UCM:
- From the Project Explorer GUI:
Launch Project Explorer
Highlight the PVOB, select Tools > Define Promotion Level
Click Add and type the name of the new promotion level.
- From the command line (CLI):
Use the cleartool setplevel command.
Usage: setplevel [-c comment | -cfile pname | -cq | -nc]
promotion-level ...
- Review the IBM Rational Command Reference Manual on the topic of setplevel (cleartool man setplevel) for more information.
How to create custom attributes for a UCM baseline
UCM Baselines are given Default Attribute types called "Promotion Level". This attribute type comes with a preset list of attributes as well as the ability to create custom attributes for that type. However, in some environments, users may want to create their own Attribute types for their baselines in addition to the Promotion Level type. This process is useful for marking certain baselines with special attribute data for use with custom queries at a later date.
Here are the steps to use to create a custom attribute for a UCM baseline.
- First you need to create the new Attribute type in the PVOB, as you would with any other type. Create the type and define the attributes values that you would like to be able to set this attribute type to for baselines in this PVOB:
M:\project1_int>cleartool mkattype -nc -vtype string -ordinary -enum \"BuildPass\",\"SmokeTested\" Attribute1@pvob
Created attribute type "Attribute1".
- Add this attribute to a specific baseline to mark it for some special purpose so you may query on this at a later date.
M:\project1_int>cleartool mkattr -nc Attribute1 \"SmokeTested\" baseline:project1_9_3_2008@\pvob
Created attribute "Attribute1" on "project1_9_3_2008".
- Now when you describe the baseline, you can see the "Promotion Level" Attribute along with your new custom Attribute, "Attribute1"
- M:\project1_int>ct desc -l baseline:project1_9_3_2008@\pvob
baseline "project1_9_3_2008"
created 2008-09-03T10:42:13-04:00 by Mike (user1.user@tribe)
owner: DOMAIN1\user1
group: DOMAIN1\user
stream: project1_int@\pvob
component: cvob@\pvob
label status: Incrementally Labeled
change sets:
act1@\pvob
asdf@\pvob
deliver.project1_dev1.20080612.161540@\pvob
erer@\pvob
promotion level: INITIAL
depends on:
Attributes:
PromotionLevel = "INITIAL"
Attribute1 = "SmokeTested"
Hyperlinks:
BaselineLbtype@352@\pvob -> lbtype:project1_9_3_2008@\cvob
Foundation@356@\pvob -> anyactivity:timeline080604.155232@\pvob
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21135893