Send email on every check-in in clearcase - clearcase

In my project there are multiple developers onsite as well as offshore who keeps on checking-in their code continuoulsly. Being the Build Engineer, I want to get the notification on every check-in with the developer name in Clearcase. As I am new to Clearcase please tell me step-by-step process what I do to achieve this as I am working on Window Platform.
I have already gone through this but I didn't understand from where I start and how. Please advise me the step by step process, if possible.
Thanks

Considering my old answer, you start by registering the post-op trigger in the vob you want to see that trigger run on each checkin.
You do that by using a dynamic view in which you mount the vob.
cleartool start anyDynamicView
cd m:\anyDynamicView
cleartool mount \aVobTag
cd aVobTag
cleartool mktrtype...
The script must be in a shared path accessible both from the vob server and by the Windows clients.

Related

Jenkins File System Trigger (FS Trigger) - should there be 2 polling mechanisms? How to incorporate %WORKSPACE%

I am using the FileSystem trigger to monitor whether the code in a folder changed (from git repo)
My thought is
use normal Poll SCM every 2 minutes
check the actual downloaded source folder in question for changes after step 1 polls the every 2 minutes.
Questions:
Is the flow correct? Should it poll SCM every 2 minutes, and then the actual folder every 2 minutes? Should it directly poll the folder in the repo on bitbucket/github? Currently the build is being built every time the project fires - it bypasses the folder check.
I tried setting the folder path to %WORKSPACE%/MyProjectToMonitorFolder and the
[FSTrigger] - Monitor folder logs said that it could not find the folder. If I hardcode the actual full folder path as in the image then the folder and changes are found. How can I incorporate %WORSKPACE% into the folder path?
Both triggers serve very different use cases and usually don't go together. I assume what you want to achieve is a trigger to your job that will run it whenever a specific folder has changes in your Git repository.
You can achieve it by first configuring you SCM Git build stage to only monitor a specific folder in your repository, it will eliminate the need for using the file system trigger as it will only trigger the job when the configured folders have changed. You can find more info in the Official Documentation under the Polling ignores commits in certain paths section.
You can also check out This Answer for more info.
In addition it is highly recommended to move from a scheduled SCM pulling mechanism to a hook based Git trigger that will trigger your job whenever new code is pushed to the repository and will avoid the need to constantly check for changes, see This This Answer for more info on the git hooks configuration.
Furthermore every major Git repository manger (GitHub, Bitbucket, Gitlab...) has dedicated integration Jenkins plugins for git hooks and other operations - so you can use one of them to make your integration easy.

ClearCase UCM stream with two views on two different hosts

Has anyone else run into this problem?
Have 1 ClearCase UCM stream. Created a view on my laptop, while on corporate campus.
Am now working remotely, create a 2nd view to same UCM stream on a VM in the corporate data center.
Try to rebase the 2nd view on the vm machine, ClearCase complains that it cannot contact albdServer on my laptop (Atria Location Broker service was not started).
Then it seems that ClearCase proceeds to rebase the first view on my laptop, not the 2nd view from where I asked for the rebase. Rebase is terribly slow, over 1/2 hour for seven files.
I know the first rule of ClearCase, but I am stuck with it ... any suggestions?
It depends on where the view storage is stored.
The easiest way to debug is to do a:
cd /path/to/second/view
cleartool lsview -l -full -pro -cview
That way, you can see where the view storage is, and (more importantly), if it is accessible (dir /path/to/view/storage.vws)
OP: By some wild chance does your domain use roaming user profiles? If you use the view creation wizard, the view creation options are stored in the local user registry so you don't have to reenter them.
If you have roaming user profiles, the local laptop's settings can/will "leak" to the VM. If you used the wizard for the first time on that VM, and didn't get prompted to set a storage location, that's the most likely reason.

Provide version to independent files in clearcase

I recently started usage of clear case tools for maintenance of code in better way. But after some days my "Company" forgot to take licence from IBM as result I cannot CHECK-IN my code into clearcase. To continue my coding i created a separate folder in other drive and copied code solution in that folder. I and my colleague modified around "9865" files of solution within "45" working days. Now a "Company" borrowed a licence for me and I able to access code clear case tool successfully.
Problem is:
How to check in my "9865" files into clearcase in better way?
I tried:
Copied all solution into Snapshot view folder location. but, all
changed files are showing "hijack".
The best way is to use clearfsimport: that will automatically checkout, and import your 9865 in one command.
Make sure to update your snapshot view first, in order to restore its original content.
Then clearfsimport those files.
clearfsimport -preview -rec -nset /path/to/sourceDir\* </myview/VOB>
The clearfsimport command will detect the files added or modified, and do the checkouts for you.
If you are using an UCM view, set an activity first.
The source from where clearfsimport does that copy can be any regular folder.

Unable to perform Undo CheckOut in ClearCase GUI

When I am trying to do Undo Checkout through my ClearCase GUI, its showing me a error message as "Error Undoing the CheckOut for "E:\Views\Stream Name\File Name'.
Lock on Versioned Object base "\ prevents operation uncheckout
Unable to cancel Checkout for 'E:\Views\Stream Name\File Name' "
Please suggest me how can i solve this issue
You need to make sure what is locked.
If it is the UCM project for instance, you need to run (or to ask your ClearCase admin to run) a cleartool unlock:
cleartool unlock project:projectname#\pvobname
If this is a file/folder, it is possible it is locked by another user, in which case it can be unlocked at any time, allowing you to proceed.
Adding to VonC's response - it's possible that the vob itself was locked for some reason. Why would a vob overall be locked? If it was being backed up, for example. Someone may have run a "cleartool lock vob:myvob" or similar for some reason. Then ran "cleartool unlock vob:myvob" afterwards. I'd ask your clearcase admin for an explanation.

Clear Case rebase operation fails

When I try to 'rebase' my stream in clear case, I get the 2 options : 'Resume rebase' and 'Undo rebase'.
But both of them give me errors. It seems a previous rebase failed and left the stream in a corrupted state.
How to solve this?
I tried stopping and starting ClearCase but no luck.
EDIT: the error is :
IDispatch error #14083
Execution of a hook failed during the action Complete. It was the ACTION_COMMIT hook attached to the UCMUtilityActivity "CR00155721".
The reason for the failure was:
Trouble communicating with VOB database: "\Alerts_Proj".
Check database log on VOB host "123yyyyy.com".
Could not perform requested operation: a UCM/ClearQuest data
inconsistency may exist:
ClearQuest "UCMUtilityActivity" record "CR00155721" is linked to a UCM object
that can not be found.
Unable to complete the rebase activity in ClearQuest.
Unable to undo set of integration activity.
Unable to complete integration.
FYI I've also seen this happen when the "CQIntSvr11.exe" fails. It seems to occur when you need to use the application on the same machine with different users (e.g. admin and developer account).
If you kill the process using task manager and then retry the operation the IDispatch 14083 should stop and then you can use your stream again.
One solution might be deactivating the trigger, but this could be put by the ClearCase-ClearQuest link and not be possible without severing completely that link.
So you can start by checking out this IBM technote with your ClearCase administrator:
This error occurs because the UCM project VOB and associated activities have been removed, ClearQuest is still looking for this information and needs this information to remove the defect.
This issue is the result the ClearCase items being removed before the ClearQuest defects and project.
Solution
To resolve this issue perform the following to fix the Activity so it can be deleted:
Browse to the ClearCase utils directory:
c:\program files\rational\clearcase\etc\utils
Run the following command from a command prompt:
Note: This command cannot be performed in the GUI
squid_patch <DBNAME> -activity ucm_vob_object ""
Note: It will display an advisory message, but it will change the field in ClearQuest.
Delete the ClearQuest record.
Remove the UCM project with the following command:
squid_patch <DBNAME> -project ucm_vob_object ""

Resources