有没有办法将 CCRC 中的环境变量用于非交互式触发器?

发布于 2024-08-03 14:33:46 字数 145 浏览 1 评论 0原文

我有一个(clearcase)preop 非交互式触发器,需要评估环境变量值(来自客户端)以便执行一些检查。

考虑到它似乎不能像动态或快照视图那样工作,是否有一种方法或 w/a 将这样的环境变量值从带有 CCRC 的客户端传递到触发器?

多谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖公主 2024-08-10 14:33:46

根据这篇IBM文章,不。服务器端未定义的环境变量可能会导致触发器认为它是交互式变量。

触发脚本引用了用户定义的环境变量,该变量在客户端上设置,但在 RWP Web 服务器上找不到。

在此示例中,用户定义的环境变量 MYCC_TRIGGER_TMP 在客户端上设置,以定义备用临时目录,并由触发器脚本引用。
但是,它并未在 RWP Web 服务器上定义。

完整错误消息的示例:

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>".

文章 为 ClearCase Remote 编写触发器客户确认了这一点,尽管是间接的。

注意:在某些情况下,预操作触发器将不起作用(例如,需要特定 ClearCase 环境变量评估的触发器)。

CCRC 作为客户端进程运行,将 RPC 命令发送到 CCRC 服务器,并由单独的 CCRC< 执行/code> 服务器进程。
这些服务器进程在 Apache 下运行,因此环境变量 (EV) 可能与交互式开发过程中在命令 shell 窗口中看到的不同。

可以使用 SetEnv 命令修改服务器配置文件(rwp.confccrc.conf)以添加环境变量。< /p>

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文