Search code examples
jenkinsclearcaseclearcase-ucm

Jenkins with Cleracase - Creating Automatic Baselines in CC and triggering Jenkins Job


I am new to Jenkins and need some help.

We have ClearCase and Jenkins running on same machine (windows).

I am trying to configure Jenkins with clearcase through basic CC or CC UCM plugin. But i am not sure which one i need to choose.

My Current Process : Step 1: Once developer deliver the code to Integration region in clearcase, Devops team manually do the baseline for Int stream and also do the rebase. Step 2: And with some batch script they build the process and move the ear or jar to particular region.

Now i need to automate this process through Jenkins, where i got stuck with automating baseline and rebase in clearcase which they are doing it manually now. i think once the baseline creation is done by developer or through command process only Jenkins will be triggered to start the job.

So please suggest me the exact steps which i need to start automating the whole process.


Solution

  • basic CC or CC UCM plugin. But i am not sure which one i need to choose.

    If your view is built from a Stream, you need UCM. If not (simple config spec with your custom rules), you need Base.
    In your case, you will use the Jenkins ClearCase UCM Plugin

    All you need to do is test that a job is triggered on a new baseline (even if that job does at first only a simple echo "It work!")

    https://wiki.jenkins.io/download/attachments/58001105/polling_smaller.png?version=2&modificationDate=1319721419000&api=v2

    Like the Git and Mercurial plugins, ClearCase UCM Plugin also supports polling for the latest baseline. This means, when polling, a build is scheduled only if there's a new baseline on the stream.

    To be able to poll for the latest baseline, the special promotion level ANY and self polling must must be selected in the setup.

    Once that is working, you can add in that job a Windows shell build step which will execute the very same command you would have typed manually in order to do the rebase (cleartool rebase...).
    If you can script it manually (outside Jenkins), you can add it to a Jenkins job trivially.