Jump to content


client side post update trigger

trigger

  • Please log in to reply
2 replies to this topic

#1 yuchih_chen

yuchih_chen

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 26 May 2016 - 12:44 PM

I need perforce client to complete some jobs locally when some files are changed. I have read the documents at https://www.perforce....scripting.html. But the documents only mention triggers in server side about submit. Does perforce support any behaviors like git post pull hook?

#2 Bruce Mc

Bruce Mc

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts
  • LocationSeattle Area

Posted 01 June 2016 - 11:16 PM

If you're looking for a true push of information, a server side trigger will work. Essentially the trigger will fire when some conditions are met. In this case, a submit action in some depot path. You would author the trigger script so it could send any signal you wanted to write.

You could also setup some sort of polling script to ask the server if there have been any new check-ins and if so, ask the server for the files in the changelist. There was a P4 review daemon written in python would send an user an email about check-ins within a path they set in their user spec. It could be used as an example of how to go about polling the server. It should be around someplace on the Perforce web site. I expect a search should

I seem to recall some discussion of the p4-plugin for Jenkins supporting a build being triggered by a Perforce server-side trigger sending a signal to the Jenkins server.

Hopefully this was helpful.

Regards,

Bruce M

#3 yuchih_chen

yuchih_chen

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 08 June 2016 - 06:30 AM

@Bruce Mc
Thanks for your advise.

But I was seeking a trigger of p4v about "Get update and the local files changed at this udpate" at any client.

So server send trigger signal when files changed may not suit this situation.
The polling script may also not suit. Because my co-workers maybe artist or designer, they are not programmers. It's hard to tell them that "you must update with this polling script, not from p4v interface."

My workaround is write a script as startup script of unity3d. If the hash of files are different, then do the update trigger job





Also tagged with one or more of these keywords: trigger

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users