I am running a job on Jenkins which is used to create a view on ClearCase and the ClearCase view creates the default config spec.
I want to edit the config spec by adding some more lines to it but I don't want to edit it manually every time. So I am looking to add some script to Jenkins so that it can edit the configspec every time when it runs the job.
Is there anyone how is clear case expert who can task it out.
Once your ClearCase view is created you need to get its config spec as a file with
cleartool edcsYou need to adds your selection rules before the default one: as mentioned in config spec
To script that, please see "Using
sed, Insert a line below (or above) the pattern?".Another option: see "How to insert the content of a file into another file before a pattern (marker)?".
Put your additional lines into a file named
othercs.Once that is done, you can append any additional load rules you want (if you are using a snapshot view, since a dynamic view has no load rules)
Finally, once the cs file has the right selection/load rules, you set it back to the current view with
cleartool setcs.