How to Add Missing Foundation Baselines in ClearCase - clearcase

So Someone from my team has deleted some foundation Baselines from an Integration Stream and now when people rebase their development stream many of the folders and files inside them are missing.
We can see those missing foundation baselines in the development streams of that Integration Stream.
So I wanted to know how I can add those missing foundation Baselines from those dev stream to int stream, we only have access to IBM ClearTeam explorer to do it.

we only have access to IBM ClearTeam explorer to do it.
So you still have the CCRC CLI (rcleartool) (assuming the CCRC WAN Server is upgraded to ClearCase® version 8.0.0.3 or higher)
mkbl, however, is a cleartool command only (not rcleartool) in CC8, but rcleartool mkbl does exist for CC 9.x.
You could use that to recreate your fundation baseline, assuming you can tweak a (preferable dynamic or webview) config spec to select the right versions.

The baseline still exists, so you should be able to rebase the integration stream to re-add the baselines. You may want to describe the baseline to find the stream the baseline was created in to be sure you know everything you need to know about it.
rcleartool rebase -baseline baseline1#/vobs/mypvob,baseline2#/vobs/mypvob
Should be enough to accomplish the job. If your int stream has a successor baseline as the foundation now, and the component is not read-only in your project, you'll get an error message. The error message should tell you more about why you can't do the rebase.

Related

ClearCase + integration from source + dependency management

In the industry I work in it's customary to do integration from source (i.e. compile all libraries from scratch). This means that the source code tree has to be configured to show the appropriate content.
I know that for binary integration there a lot of tools out there, tailored to the programming languages (Maven, CMake, Gradle, etc.).
We use base ClearCase as a source control tool. How does one go about implementing dependency management when integrating from source? In ClearCase I would imagine this entails setting up the config spec to select the required versions of all of the required files. Are there any tools out there that implement this?
Are there any tools out there that implement this?
Yes: ClearCase UCM, meaning not base ClearCase.
Building from different version of "components" (group of files) is why you have the notion of:
UCM components
baseline: a label applied on all files in an UCM component)
stream, which lists the exact foundation baselines you need for your program to work, or in your case, for your CI to take place.
Any UCM view on an UCM stream would generate the right config spec for you.
This is what a CI engine like Jenkins would use with JENKINS ClearCase UCM Plugin.
UCM does make this easier. But if your organization is politically averse to trying it, you can do a lot of the same thigs using base clearcase.
Streams are not much more than branches with additional metadata added on (activities, timeliness, baseline links, etc)
Baselines are essentially labels with more metadata. That metadata connects baselines to descendant and sibling baselines, and let's you have a baseline that maps baselines across components. It also links baselines to streams so you can't delete a baseline used by a stream.
You don't need UCM to do UCM-like things, it just takes more time and isn't as nicely encapsulated.

Finding the Latest Baseline in clearcase on which Rebase is not yet happned

We have created multiple Development streams under Integration and also have one Deployment stream.
When the developer will do the changes and any one of the Dev stream and create the Baseline on Int, it automatically triggers rebase on Deploy stream, then build and deployment will happen.
The issue here is how do I know which development steam created the baseline when I have one deployment stream for rebasing against, with many Development streams for build and deployment.
Is there any command to find the latest baseline created and on which still the rebasing is not happened?
You have this I presume:
Int
|
-----Deployment
|
-----Dev1
|
-----Dev2
|
-----Dev3
You deliver to Int, then rebase to Deployment.
You know which baseline has just been rebased from Int (since a rebase simply replace the foundation baseline of Depl with one coming from Int)
But you don't know what that baseline on Int comes from Dev.
Simplest solution: if that baseline on Int is created each time one dev baseline is delivered: naming convention.
A proper baseline name can help you remember the dev baseline it comes from.
The problem with rebase is that, once you rebase on deployment, you don't know what was the baseline present on deployment just before the rebase.
That is why, in addition of a rebase, you need to update a metadata attached to, for instance, the Deployment stream object, in order to keep a list of the rebased baselines.
See as an example cleartool mkattr illustrated in "How to update the property for all member baseline in UCM?".

Simple deployment from ClearCase on Unix

I have recently joined a team that has several applications that perform workload automation. They use ClearCase for version control but the development and test environments are (I surmise due to a lack of ClearCase expertise within the team) not checked out/deployed out of ClearCase but simply FTP-ed to respective Unix servers from Window. I said "simple deployment" because all the code is interpreted (Perl and shell) so no need to compile. Needless to say, many things are wrong with this approach, most specifically the lack of version management in these environments from the point of deployment onward.
So I would like to bind our deployments to the repository and start controlling changes but I am only a ClearCase novice. My specific question is: what is it that I deploy, a VIEW or a STREAM? I would say the latter cause views are user-specific while (according to my understanding) a stream is a project trunk off of each view is like a branch and views are integrated into their stream.
If anyone has any pointers on some useful yet succint and lightweight ClearCase tutorials for an "accidental" CM liason, please share.
Alternatively, if you think this task is suitable for Jenkins, despite being relatively simple (no build/compile involved) please chime in.
Thanks in advace
You would need to use the Jenkins ClearCase UCM plugin (in combination with Jenkins ClearCase plugin) in order to start jobs based on a ClearCase Stream
Jenkins will create an UCM snapshot view based on the stream you will specify in it.
See also, for more on the stream:
"Difference between branches and streams in ClearCase?"
"Integration stream vs integration view in ClearCase"

Rebase versus Delivery

After going to production, they want to update the Dev and INT streams with the current Prod Code.
Should I deliver (interproject) to Dev streams and then deliver up to Integration or deliver to Integration and then rebase to Dev?
We have a Maintenance-HotFix and two Dev streams for different releases.
If this is a "prod" code, it is best to deliver to INT, and then rebase to Dev.
That way, the new foundation baseline (ie the new "prod" baseline) will be clearly visible on the Dev stream (because that is what a rebase does: changing the foundation baseline).

How do I undo a checkin in ClearCase remote client

I am using ClearCase remote client Version 7.1.1, and I am wondering if it's possible to delete a version that was checked in by mistake.
I know that in ClearCase, this is possible by choosing delete in the right click menu (Versions tree)
Anyone has the answer ?
Thanks
Argh! rmver (see man page)?
I would strongly advice against such an operation which cannot be undone
(as I mention and detail in here, here or there).
And rmver is not possible in a CCRC client (even in the latest 7.1.2).
What I usually do is a graphical merge from the n-1 version to the n version in order to produce a n+1 version with the right content.

Resources