views:

185

answers:

1

Hi!

I have a (clearcase) preop non-interactive trigger that needs to evaluate an environment variable value (from client side) in order to perform some checks.

Is there a way or w/a to pass such environment variable value from client with CCRC to the trigger, considering it seems to do not work as with dynamic or snapshot view?

Thanks a lot!

A: 

According to this IBM article, no. A non-defined environment variable on the server side might cause the trigger to think it is an interactive one.

The trigger script was referencing a user defined environment variable which was set on the client but could not be found on the RWP web server.

In this example the user defined environment variable MYCC_TRIGGER_TMP was set on the client to define an alternate temp directory and is referenced by the trigger script.
However, it was not defined on the RWP web server.

An example of the full 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 the ClearCase Remote Client confirms that, albeit indirectly.

Note: Under certain conditions, pre-op triggers will not work (for example, triggers that require specific ClearCase environment variable evaluation).

CCRC runs as a client process that sends RPC commands to the CCRC server, where they are executed by separate CCRC server processes.
These server processes run under Apache, so the environment variables (EVs) will likely be different from those seen in command shell windows during interactive development.

The server config file (rwp.conf, ccrc.conf) can be modified to add environment variables using the SetEnv command.

VonC