ClearCase + integration from source + dependency management - clearcase

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.

Related

How to Add Missing Foundation Baselines in 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.

Maintaining a monorepo for a react project

What I am looking for is a master package/Sdk that defines my features, now I have various build version of this Sdk with customized features, now whenever I add a new feature to the master, it automatically reflects in the other build versions, I might have a lot of versions of it in the near future so the idea of keeping different repos/branches then merging them, later on, can turn into a nightmare( I do this right now).
I have thought of creating a configuration based system but as the sdk grows maintaining those configuration files will be a bigger challange than merging projects.
Android does something like this, example
I have my MainActivity( the top level file)
and I have a build version which has its own customized MainActivity
now When I update my top-level file, I see those changes in my build file too.
Note: All features added will not raise merge conflicts(As long as I am not updating old features). Any suggestion, StackOverflow reading recommendation will help.

How to Organize related applications into git repo's?

What is the decision tree to know when to split a suite of related and/or cohesive applications into git repo's and/or branches? Should I keep each app in a repo? Or all app's & dependencies in a single repo? Or something in-between?
answer How should I organize multiple related applications using git? claims that a repository per project is appropriate, but does not give clues as to what a project would be.
And then there's the question of dev, test, integration test, and production checkouts when the git repo's are split. Answer how do you organize your programming work lists some branch/tag options, but ignores the multi-app details.
There's also the DB schema! incremental definition of the schema helps, but again, where would one keep this definition if the DB spans back-end and front-end app's?
Some examples I've been pondering:
a front-end web app and it's back-end CGI/DB: one repo or two?
a set of web back-ends that use features from other back-ends
a set of front-end app's that share CSS and jquery plug-ins
selenium scripts that test front-end features across dependent code - in the front-end app repo or the dependent code repo?
If I want to work on a single app, it's hard (well, tedious and error prone) to check out a directory of a repo, so I have to check out the entire git tree (or at least clone the whole tree), so that implies that git is not really built for keeping all the app's & dependencies in a single tree.
But if I want to keep each of the projects (app's, frameworks, dependencies, doc trees, CSS) in it's own repo, then I run into chasing my tail for dependency resolution, that is, I don't know which version of each app are compatible. I think git tags are a good way to go, if only I could move them to newer versions that maintain compatibility.
When app's split or merge -- as happens often with refactoring models down to baser models -- can i move the git history of just those files to another git? I don't see how to do this, so that leans towards a single repo for it all.
If I develop a new feature across app's, it would be nice for branches to represent features.
I think I want a repo of repo's -- does that exist?
This is about using a component approach: a component being a coherent set of files which have their own history (own set of branches, tags and merges).
It should include only what cannot be generated (although the db schema can sometime be added to the repo, as seen in "What is the right approach to deal with Rails db/schema.rb file in GIT?". You still can generate it though, as shown in "What is the preferred way to manage schema.rb in git?", to avoid needless conflicts)
A component can evolve without another one having to evolve. See "Structuring related components in git".
That is the main criteria which allows you to answer: "X and Y: one or two repos?".
You can split a repo into two later, but be aware that will change their history: other contributor will need to reset their own repo to that new history.
You can group those different components repos in one with submodules, as explained here (that is the "repo of repos", or, if you want to have only one repo, in subtree, as illustrated here.

Clearcase Comment Search GUI based utility

I am working in a project which uses Clearcase for it source code management. Many times we have come across scenarios where we want to find all files having a particular set of keywords in the checkin comments like when tracking files changed for a cahnge request.
As of now, we do it with help of Clean approach suggested in this answer Searching ClearCase for a checkin with a specific comment
But we would really like to get our hands on some utility like fisheye for clearcase so that it becomes easier to do our task
The problem is, any utility you would find would be based on the same cleartool find -exec command I mention in my previous answer (ie: quite slow)
And FishEye 2.9+ doesn't support ClearCase anymore.
Only recent version of (commercial) tools like GoMidjets Visual Annotate offers some kind of efficient search on those metadata.

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"

Resources