Is there a way to use the Env variable from CCRC for a non-interactive trigger?
I have a (clearcase) preop non-interactive trigger that needs to evaluate the value of an environment variable (client side) to do some validation.
Is there a way or w / a to pass such an environment variable value from the CCRC client to the trigger, assuming that it doesn't work like a dynamic or snapshot?
Thank you so much!
According to this IBM article , no. An undefined environment variable on the server side can cause the trigger to treat it as interactive.
The script trigger referred to a custom environment variable that was set on the client but not found on the web server
RWP
.In this example, a custom environment variable has
MYCC_TRIGGER_TMP
been set on the client to define an alternate temporary directory and is referenced by the script trigger.
However, it was not defined on the web serverRWP
.
An example of a complete error message:
Unable to checkin "<path to file>"
Error: directory for environmentvariable "MYCC_TRIGGER_TMP" or "TMP" not found
ccweb: Warning: Trigger "ci_pre" has refused to let checkin proceed.
Interactive triggers are not supported in the Web interface.
If the trigger was interactive, it may have failed for that reason.
ccweb: Error: Unable to check in "<path to file>".
The article Writing Triggers for a ClearCase Remote Client confirms this, albeit indirectly.
Note. Under certain conditions, pre-op triggers will not work (for example, triggers that require specific evaluation of ClearCase environment variables).
CCRC
works as a client process that sends commandsRPC
to the serverCCRC
, where they are executed by separate server processesCCRC
.
These server processes run under Apache, so environment variables ( EVs ) are likely to be different from those seen in shell windows during interactive development.The server config file (
rwp.conf
,ccrc.conf
) can be modified to add environment variables using the commandSetEnv
.
source to share