AY-6885_Perforce events to AYON #18
Labels
sponsored
This is directly sponsored by a client or community member
type: feature
Adding something new and exciting to the product
For further automations, we need to be able to get events (like commits, etc) from Perforce and get them to AYON events so we can act on them.
Summary:
We need to create AYON endpoint that will receive messages for a trigger script and convert them to AYON events. This endpoint should live on some AYON addon (and most likely ayon-version-control (and we should rename that one to ayon-perforce or ayon-helix-core)). This endpoint will "just" create event, it shouldn't process anything (like getting files from the changelist number passed in the event, etc. - that should be job of other parts).
About triggers:
In Perforce we can utilize Triggers - Triggers are scripts running on the server side, either writen in Python, Ruby, Perl or Bash, listening to specific events.
There are many events available, but for our use case, we want to handle
change-commit
that executes after changelist creation, file transfer, and changelist commit (example ofchange-commit
trigger is here). This will trigger on commit, but maybe we want to handle when the data is actually shared. Perforce has pushand submit. There are differences, most notable is that push can work with multiple changelists -
push-commit
is the name of event. For auditing, we might want to handle fetch event.When this trigger script is added to perforce and registered in trigger table, it communicates with the server via script variables. We can use
%changelist%
to get the number of newly submitted changelist to query server for the list of changed files and with that, we can find out what asset was changed. Note that you can use p4 command directly in trigger scripts.This issue was automatically created from Clickup ticket AY-6885
The text was updated successfully, but these errors were encountered: