2

I have a perl script to rebase the recommended baseline to Dev view (Dev view is in M: drive). When i am running the script from command prompt it is working, but the same script is failing when i call from Jenkins. (I am using same username as my login id in Jenkins.) Please suggest me if i am missing any configuration.

**Command which i used :** 
cleartool rebase -complete -view <DEV_VIEW_TAG> -force -recommended -abort

****Jenkins Console Output:****

Advancing to baseline "<Recommended Baseline>" of component "<Component Name>" 
Updating rebase view's config spec... 
cleartool: Warning: Config spec OK, but unable to tell view server to load. 
cleartool: Warning: View server should be restarted. 
cleartool: Error: Unexpected error in rebase. 
cleartool: Error: Unable to update configuration specification. 
cleartool: Error: Unable to perform integration. 
cleartool: Error: Unable to rebase stream "<DEV_STREAM>".


**Through Command Prompt - output:**

M:\>cleartool rebase -complete -view <DEV_VIEW_TAG> -force -recommended -abort
Advancing to baseline "<Recommended Baseline>" of component "<Component Name>"
Updating rebase view's config spec...
Creating integration activity...
Setting integration activity...
Merging files...
No versions require merging in stream "<DEV_STREAM>".
Checking in files...
Clearing integration activity...
Updating stream's configuration...
Cleaning up...
Rebase completed.
Java_Sol
  • 83
  • 6

1 Answers1

2

Double-check your USERNAME and other environment variable in the failed JEnkins job.
That will validate that you are using ClearCase in the same condition as in your command-line.

I have always seen that error message because a rebase was in progress at the time the Jenkins job was attempting its own rebase.
So make sure, before launching the Jenkins job, that no rebase is in progress in the view used by said job.

USERPROFILE = C:\Windows\System32\config\systemprofile

That is exactly what I thought: Jenkins is launched with a System account instead of your account. Double-check the Jenkins Windows service: you should be able to change its account used to run it: use yours.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • i am sure there is no rebase was in progress, but still i am getting the same issue. may be i need to cross verify the other environmental variables as you mentioned above. – Java_Sol Aug 03 '17 at 20:33
  • i am seeing environment variables have some mismatch like USERPROFILE = C:\Windows\System32\config\systemprofile , TEMP but my user environment variables is like C:\User\XXXX . Is there any way i can override the system property files. – Java_Sol Aug 03 '17 at 22:58
  • I have tried to change the Jenkins account, but unable to fix it. Still i am getting the same error. Do you have any idea how to switch the user dynamically. – Java_Sol Aug 07 '17 at 17:57
  • @Java_Sol No need to hcange the user dynamically: you just need to start the service with the right account. Then execute a job (any job), and confirm in the environment variable (once the job completes) that the USERNAME is the one running Jenkins. – VonC Aug 07 '17 at 21:44
  • I have started the service with my account and now i am able to run the job successfully. Thanks a lot VonC. – Java_Sol Aug 09 '17 at 20:46