View that uses attributes to select versions
Suppose that the QA team also works on the major branch. Individual developers are responsible for making sure that their modules pass a QA check. The QA team builds and tests the application, using the most recent versions that have passed the check.
- (1)
element –file src/* /main/major/{QAOK=="Yes"}
- (2)
element * /main/LATEST
To make this scheme work, you must create an attribute type, QAOK. Whenever a new version that passes the QA check is checked in on the major branch, an instance of QAOK with the value Yes is attached to that version. (This can be done manually or with a DevOps Code ClearCase® trigger.)
If an element in the /src directory has been edited on the major branch, this view selects the branch’s most recent version that has been marked as passing the QA check (Rule 1). If no version has been so marked or if no major branch has been created, the most recent version on the main branch is used (Rule 2).
On Linux and the UNIX system
cleartool find . –branch '{brtype(major) && \! attype_sub(QAOK)}' –print
The backslash ( \
) is required in the C shell only, to keep the exclamation
point ( !
) from indicating a history substitution.
On the Windows® system
cleartool find . –branch "{brtype(major) && ! attype_sub(QAOK)}" –print
The attype_sub primitive searches for attributes on versions and branches of an element and on the element itself.
This scheme allows the QA team to monitor the progress of the rest of the group (see the following figure).
The development config spec always selects the most recent version on the major branch, but the QA config spec may select an intermediate version.