1

I am using Jenkins to manipulate files and directories in Base ClearCase. I am executing the batch file

cd /D M:\view\path\to\stuff\Jenkins
echo Test to see if Jenkins can add things to ClearCase> foo.txt
cleartool checkout .
cleartool mkelem foo.txt

and I get the output

M:\jenkins_dynamic\CSTS\01_Build\Automated_Build\Jenkins>cleartool checkout . 
cleartool: Error: Element "." is already checked out to view "jenkins_dynamic".

M:\jenkins_dynamic\CSTS\01_Build\Automated_Build\Jenkins>cleartool mkelem foo.txt 
cleartool: Error: Can't modify directory "." because it is not checked out.

What am I missing here?

Zoe
  • 27,060
  • 21
  • 118
  • 148

1 Answers1

0

Double-check your dynamic view config spec, as in this technote, with cleartool catcs:

cleartool catcs -tag jenkins_dynamic

The cause of this error relates to the current view's config_spec; it may have a -mkbranch rule or use an existing branch name for a branch type that is not mastered at the local site.

If the parent directory can't be checked out on the non-mastered branch, then new elements can't be created in that directory.

Example: this config spec (without the loading rules, since you are in a dynamic view).
Make sure all the parents folders are accessible and visible.

So that kind of error could be in the context of a multi-site ClearCase.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • How would I check if a directory can't be checked out on the non-mastered branch? It's strange because it says that I am checking out the directory 'Jenkins', but then saying I can't modify it because it isn't checked out. – Christian Bouwense Jun 19 '17 at 15:11
  • @ChristianBouwense First: what version of ClearCase are you using? Is it multiSite? – VonC Jun 19 '17 at 15:12
  • ClearCase version 7.1.2.19, not multiSite. – Christian Bouwense Jun 19 '17 at 15:27
  • @ChristianBouwense OK, what is your config spec? – VonC Jun 19 '17 at 15:28
  • I don't think I can give you that information since it's technically proprietary, but I can say that I'm starting with element * CHECKEDOUT and that the directory which I'm trying to check out is not on the main branch, but I am selecting for it. (Btw thanks for helping me out with this!) – Christian Bouwense Jun 19 '17 at 15:30
  • Is there a mkbranch rule? What cleartool ls returns in the parent folder of the folder which should be checked out? – VonC Jun 19 '17 at 15:31
  • There are no mkbranch rules. This is the result of cleartool ls in the parent directory of the directory I'm trying to check out (namely \Jenkins) M:\jenkins_dynamic\CSTS\01_Build\Automated_Build>cleartool ls foo.txt Jenkins@@\main\dev\B_Windows7Candidate\6 Rule: ...\B_Windows7Candidate\LATEST readme.txt@@\main\dev\1 Rule: SIRN12187 SIRN11796xx_latest@@\main\dev\1 Rule: SIRN12187 SVD_Generator@@ [no version selected] – Christian Bouwense Jun 19 '17 at 15:34
  • @ChristianBouwense Without a mkbranch rule as shown in https://stackoverflow.com/a/44414449/6309, you won't go very far. – VonC Jun 19 '17 at 16:02