Search code examples
jenkinsclearcase

How to create/recommend ClearCase baseline via commands?


Jenkins allows to add a build step that executes Windows Batch Commands. What would be the commands to create and recommend a ClearCase baseline?

The stream has only one component. The baseline should take all activities, so no activity selection.

Commands

cleartool mkbl -view myViewName "Test"  // created baseline Test.150

Solution

  • If you can execute cleartool command, you would recommend a baseline using cleartool chstream:

    cleartool chstream -nc -recommend BL1@/vobs/pop_pvob 
    

    Rules for recommending a baseline

    You can recommend a baseline for a stream if the baseline is from the stream or the stream's foundation.

    For a baseline not from the stream or the stream's foundation, the following rules apply:

    • The baseline must be an ancestor of the stream's foundation baseline and must have been created on the same stream as the foundation baseline.
    • The baseline must be contained in the stream, which means the baseline has been delivered to the stream, or the stream has rebased to the baseline or one of its descendants.
    • The baseline must contain the current recommended baseline, which means it must be a descendant of the current recommended baseline.

    You are not required to recommend a baseline for every component in the stream's configuration.

    See also "Remove and recreate UCM baselines":

    cleartool chstream -recommended BL1@\ProjectVOB,BL2@\ProjectVOB stream:stream-name@\ProjectVOB