简体   繁体   English

如何创建一个Web服务来包装perl脚本或shell脚本

[英]how to create a webservice to wrap a perl scripts or shell scripts

Our development is mostly on windows, VCS is ClearCase. 我们的开发主要是在Windows上,VCS是ClearCase。 We also use quite lot of scripts (perl, bash) on Linux to do code quality checks, regression tests etc. For example a script takes stream name, creates a dynamic view, generate a CPD report for the newly added files. 我们还在Linux上使用了很多脚本(perl,bash)来进行代码质量检查,回归测试等。例如,脚本采用流名称,创建动态视图,为新添加的文件生成CPD报告。 Another one submits specific tests to a sun grid engine(SGE) 另一个提交太阳能发动机(SGE)的具体测试

Currently user should login to a linux machine with a specific account, then edit some configuration files and run the scripts. 目前用户应该使用特定帐户登录到linux机器,然后编辑一些配置文件并运行脚本。 User sometimes makes unwanted edits and creates trouble. 用户有时会进行不必要的编辑并造成麻烦。

We could probably improve the flow by using rsh. 我们可以通过使用rsh来改善流量。

I guess exposing the whole thing via web service may better. 我想通过Web服务暴露整个事情可能会更好。 The user could then use a java program(web service client) to invoke the taks. 然后,用户可以使用java程序(Web服务客户端)来调用tak。

   java com.check.MyQualityChecks -stream blah -generate-cpd

Is there any thing that could help to me wrap existing scripts via a web-service? 有什么东西可以帮助我通过网络服务包装现有的脚本吗?

There isn't a direct cleartool encapsulation through web service. 通过Web服务没有直接的cleartool封装。
The closest existing service is for CCRC (ClearCase Remote client), with its Java CM API , which you could use if Linux machine was a CCRC server. 最近的现有服务是CCRC (ClearCase Remote客户端)及其Java CM API ,如果Linux机器是CCRC服务器,您可以使用它。

I would recommend developing your own web service, which would then call the script, but beware of the primary group and owner executing that script through the web service: the account needs to be in the right group (one of the groups of the Vob) and with the right umask (in order to create correctly protected views). 我建议您开发自己的Web服务,然后调用该脚本,但要注意通过Web服务执行该脚本的主要组和所有者:该帐户需要位于正确的组中(Vob的一个组)并使用正确的umask(为了创建正确的受保护视图)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM