So, I’m setting out to do some perforce triggers for content validation and I have an interesting little problem to contemplate.
The actual perforce server is hosted offsite, behind a lot of security. Getting RDP or other access to it is a bureaucratic hassle. Unfortunately, perforce triggers run locally on the server (and on windows, they run on the default System account) – which means that it’s pain in the ass to manage and test.
So there’s two parts to the puzzle:
- How to set up the system so I can iterate on it without spending all my time begging for remote access to the server from the security Nazis. Options:
a) It’s been suggested that the triggers have their own dedicated p4 client on the server machine and that they force-sync a directory of trigger executables before they fire: that would make sure that I can update the trigger behavior by updating files in the perforce server itself. Bad part: testing and developing on a different environment and only finding out what works after altering the server state
b) Perhaps a web app running on my own machine? The trigger is a dumb HTTP call that just passes the trigger info to the web app which does the real work. Good part: I can see the tool running and debug it locally, and the servers side of things never changes. Bad part: I’ve got to have my own server up all the time.
c) ?? Any bright ideas?
the second part:
2) what language to do it in?
a) I’d want to do it in python except that commits me to maintaining a python environment on the server machine – with all the usual crap about paths, etc – through the remote connection. Especially annoying because the perforce .pyd wants to be located near they python binaries, so making it all self contained is harder.
b) I could see publishing each trigger as a click-once windows exe. I think it’s possible for those to update themselves on startup . However the version I’m familiar with requires user confirmation, which won’t work remotely.
c) (getting kind of crazy here) Jython with the whole trigger environment in a single JAR, run by Java Web Start. I’m pretty sure the server has Java on it.
d) …?
Discuss.